Page 1 of 1

setParameter() and setProperty throw error

Posted: Tue Jan 26, 2010 3:55 pm
by jdela13
I have searched this forum and read the documentation, but I cannot get the setParameter or setProperty javascript functions to work. In both IE 8 and Firefox 3.5.7 I get the following errors respectively:

IE: Object doesn't support this method or property
FF: document.fileupload.setParameter is not a function

I tried including the jsapi as was suggested in another post, but that did not work. I am making the call after the fileupload is loaded. I am running JFileUpload 2.5 Pro (as evaluation for a client).

Here is the parameter I am trying to update prior to going to the processor page:

document.writeln('<PARAM NAME="param4" VALUE="folderpath">');
document.writeln('<PARAM NAME="value4" VALUE="folder">');

I want to change the value of value4 to something that is selected on the page. From what I gather it should be as simple as document.fileupload.setParameter("folderpath", <form value>);

I have also even tried setting the Forward property, just to see if I can get that to work, but no luck... document.fileupload.setProperty("forward", "http://www.google.com"); fails with the same error message. Without being able to pass in the folder location this will not work. I downloaded the code and checked to make sure that I am not missing a reference to some other javascript file that needs to be included, but I have not found one. Any other ideas on how to fix this?

Re: setParameter() and setProperty throw error

Posted: Tue Jan 26, 2010 7:51 pm
by support
Could you try to install the JSPAPI and try document.fileupload.setExtraParameter ?
Also could you make sure the applet tag NAME is "fileupload" ?

Re: setParameter() and setProperty throw error

Posted: Wed Apr 21, 2010 2:16 am
by cserold
I am having the very same issue when calling document.fileupload.setExtraParameter. Is there a solution to this?

Re: setParameter() and setProperty throw error

Posted: Thu Apr 22, 2010 7:04 am
by support
Could you try document.fileupload.putExtraParameter(name,value);
Also, do you have MAYSCRIPT=true and script=true as in JSAPI HTML sample?