Page 1 of 1

JSAPI - JSTransferCompleted javascript

Posted: Tue May 04, 2010 8:12 pm
by kkoehler
OK - I run the file upload and display the filename (param4a) back on the screen. After it is on the screen I would like to submit this information to another application. The filename displays on the screen but I can not pass it in to the program as it is not in the html.

Any ideas?

Kathy

Re: JSAPI - JSTransferCompleted javascript

Posted: Wed May 05, 2010 6:11 am
by support
Can't you call:
var value = document.fileupload.getExtraParameter("yourcustomparam");
in the JSTransferCompleted callback ?

Re: JSAPI - JSTransferCompleted javascript

Posted: Wed May 05, 2010 12:58 pm
by kkoehler
OK - I have that working. I have 2 file upload applets on my screen and want to get the file name from one applet and store it in one field and get the file name of the other applet and store it in another field. How to I do that? One overwrites the other.

Re: JSAPI - JSTransferCompleted javascript

Posted: Wed May 05, 2010 5:43 pm
by support
The problem is with the callbacks? You can define a target iFrame for the callback. Use one iFrame per applet instance. Also, use two different NAME for applet (see NAME parameters) :
For applet1:
<PARAM NAME="targetframe" VALUE="iframeid1">
...
document.fileupload1.getExtraParameter(...)

For applet2:
<PARAM NAME="targetframe" VALUE="iframeid2">
...
document.fileupload2.getExtraParameter(...)

Does it help?