Passing parameters to process.cfm
Posted: Tue Dec 08, 2009 6:20 pm
Hi,
I'd like to pass run time parameters to process.cfm (a Cold Fusion script in my case) so that I can have the uploaded files stored in a dynamically evaluated folder name.
I've tried using URL parameters appended to the applet's URL parameter as indicated in the samples but I think the execution of the doc.writeln statement to define the applet (in applet_http_batchupload.js) doesn't allow the evaluation of a ColdFusion variable
eg I've tried modifying the .js file to :
document.writeln('<PARAM NAME="url" VALUE="https://someserver.com/process.cfm?mypa ... of_myparam#">');
but if I dump the actual URL parameters passed to process.cfm by the applet, what is shown is myparam=
This seems to indicate the pound sign is causing a problem.
I'd rather modify process.cfm to place the uploaded files in the folder I want than have to move the files later. I realize I could use the post parameter and extra parameters to pass the desired folder name to the script named in the post parameter but if there's a way to pass dynamic information to the process.cfm template using the URL parameter of the applet I'd prefer it.
I actually have a requirement that the domain name in the URL be a dynamically evaluated CF variable since this application sometimes has to run on a backup server but I couldn't get past the # in the domain portion of the URL parameter either.
ie document.writeln('<PARAM NAME="url" VALUE="#evaluate_this_variable#">')
I hope this makes sense and any help you can offer would be much appreciated.
Thanks,
Julian
I'd like to pass run time parameters to process.cfm (a Cold Fusion script in my case) so that I can have the uploaded files stored in a dynamically evaluated folder name.
I've tried using URL parameters appended to the applet's URL parameter as indicated in the samples but I think the execution of the doc.writeln statement to define the applet (in applet_http_batchupload.js) doesn't allow the evaluation of a ColdFusion variable
eg I've tried modifying the .js file to :
document.writeln('<PARAM NAME="url" VALUE="https://someserver.com/process.cfm?mypa ... of_myparam#">');
but if I dump the actual URL parameters passed to process.cfm by the applet, what is shown is myparam=
This seems to indicate the pound sign is causing a problem.
I'd rather modify process.cfm to place the uploaded files in the folder I want than have to move the files later. I realize I could use the post parameter and extra parameters to pass the desired folder name to the script named in the post parameter but if there's a way to pass dynamic information to the process.cfm template using the URL parameter of the applet I'd prefer it.
I actually have a requirement that the domain name in the URL be a dynamically evaluated CF variable since this application sometimes has to run on a backup server but I couldn't get past the # in the domain portion of the URL parameter either.
ie document.writeln('<PARAM NAME="url" VALUE="#evaluate_this_variable#">')
I hope this makes sense and any help you can offer would be much appreciated.
Thanks,
Julian