setParameter() and setProperty throw error

Upload core product.
Post Reply
jdela13
Posts: 1
Joined: Mon Jan 25, 2010 6:06 pm

setParameter() and setProperty throw error

Post 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?

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: setParameter() and setProperty throw error

Post 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" ?

cserold
Posts: 7
Joined: Thu Jun 11, 2009 4:00 pm

Re: setParameter() and setProperty throw error

Post by cserold »

I am having the very same issue when calling document.fileupload.setExtraParameter. Is there a solution to this?

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: setParameter() and setProperty throw error

Post by support »

Could you try document.fileupload.putExtraParameter(name,value);
Also, do you have MAYSCRIPT=true and script=true as in JSAPI HTML sample?

Post Reply