Page 1 of 1
Display Script Output
Posted: Fri Jul 11, 2008 3:26 am
by guestuser1
How do you display the output of the script referenced in the 'url' param in JFileUpload? It seems like this would be set in the i18n file but I can't find a definition for all of the values.
Re: Display Script Output
Posted: Fri Jul 11, 2008 6:26 am
by support
Output of the upload script ? You mean HTML code returned by your script ? or logs/traces ?
For logs/traces see:
http://www.jfileupload.com/products/jfi ... oting.html
Re: Display Script Output
Posted: Fri Jul 11, 2008 1:08 pm
by guestuser1
The debug is somewhat helpful but i was able to do the equivalent with packet captures.
I'm talking about during normal use, displaying the POST response in JFile so I know after each post if the script processed it ok or not.
Re: Display Script Output
Posted: Fri Jul 11, 2008 6:17 pm
by support
HTML content of POST response is not displayed. The applet checks for HTTP 200 OK to know if upload has succeeded. If the server returns HTTP 50x or 40x then an error message is displayed. If you want to pass a custom error message from server-side to applet then enable the following extra parameter in JavaScript:
...
document.write('param2="errorheader" ');
document.write('value2="custommessage" ');
...
document.writeln('<PARAM NAME="param2" VALUE="errorheader">');
document.writeln('<PARAM NAME="value2" VALUE="custommessage">');
And then in your server-script, pass your message into "custommessage" HTTP header. For instance, in PHP you can do this with:
$errormsg = "Your error message here";
header("HTTP/1.1 405");
header("custommessage: ".$errormsg);
Does it help ?