If you want to use your own script in the HTTP uploader, add the xsuploader Javascript object to “Uploader script (88)” in the code editor.
Related articles
Script for the HTTP uploader
The xsuploader object is supported in Flex only.
The xsuploader object can have the following methods:
You can load the above code from the examples. It is recommended to remove the functions that you don’t need.
The function “init()” is called at the start of the Infradox script initialization object, and “afterinit()” is called at the end.
Note that you can omit the “:function()” part, for example:
instead of
A few examples:
If you want to use your own validation script or if you want to display an alert et cetera, then you can use the function “onsubmitclick”. This function must return true or false. If you return false, then the submit function will not be called.
If you want to control which radio button is selected by default in the submission box at the bottom, you can add the function “afterupdatesubmitoptions”.
This script will make the radio button “Keep files in the holding area” (which has value 0) selected by default:
If you want to change the text of the submit button depending on which submit option is selected, you can add the following to the function “submitoptionchange”. This function receives the parameter “v” which is the value of the active radio button (0,1 or 2).
If you want to write script if a user changes a drop down box, then add the function “dropdownchanged”. Your function will be called with the dropdown box as the parameter. To find out which drop down box changed and what its value is, you can use the following script: