I've tried jsapi to intercept some events to pass arguments from a form to jfileupload.
The problem is that the JSTransfertTriggered doesn't do the trick. The argument I set in this function is not available for the current download but for the next.
Is there a solution to pass parameters from the form to the applet by this means ?
I would like to take the value from fields on the page containing the template.
JFileUpload, Forms and JSAPIRe: JFileUpload, Forms and JSAPIOk, you can pass extra parameter (i.e. your custom parameter) to the applet through:
<PARAM NAME="param6" VALUE="yourparam"> <PARAM NAME="value6" VALUE="yourvalue"> With the JSAPI, you can get any extra parameter at anytime through: var v = document.fileupload.getExtraParameter(extraparam); So what about using getExtraParameter inside the JSTransferTriggered(...) JavaScript callback ? For instance: Code: Select all
Re: JFileUpload, Forms and JSAPII don't need to get the value of the parameter I write in the applet, I don't thing getExtraParameter will do the trick.
When I create the page with the applet I don't know the values of the parameters, I thus need a form to ask them to the user and before just upload begins I need a way to send them to the applet. If in JSTransfertTriggered I write an alert, it displays correctly but it doesn't wait I close the dialog before uploading the file. If I use setExtraParameter, it is not taken into account for the current download but it will be used for subsequent one. Re: JFileUpload, Forms and JSAPII see ... and can't you call setExtraParameter(name,value) before the end-user select files and upload ?
Re: JFileUpload, Forms and JSAPIA workaround is to show the form and hide the applet. When the user click a button I set the extraParameters, disable the form and display the applet...
But you should consider to allow callback function. |