I have the following defined in my applet tag:
document.write('param2="username" ');
document.write('value2="test"');
document.writeln('<PARAM NAME="param2" VALUE="username">');
document.writeln('<PARAM NAME="value2" VALUE="test">');
If I have a JavaScript variable defined as follows for example:
var theUsername = "xxxxxx"; // This value is dynamically generated
How can I set the applet value2 to the value of theUsername before the user selects files to be uploaded? In other words VALUE="test" should be VALUE="xxxxxx" before the upload starts.
If it is not possible, please say so.
Thanks.
Jonathan
Updating Applet param values with JavaScriptRe: Updating Applet param values with JavaScriptTry:
document.fileupload.setParameter("username","yourusername"); See: http://www.jfileupload.com/products/jfi ... aq.html#49 Re: Updating Applet param values with JavaScriptThank you so much. It solved my problem for Firefox.
It seems not to work for IE 7. In IE 7, I get the debug message: Object doesn't support this property or method. This how I defined it in Applet: document.write('param2="username" '); document.write('value2="test" '); document.writeln('<PARAM NAME="param2" VALUE="username">'); document.writeln('<PARAM NAME="value2" VALUE="test">'); In JavaScript: document.fileupload.setParameter("username","some-user-name"); Does it really work with IE 7? If it does what is wrong then? Thanks. |