Display Script Output

Upload core product.
Post Reply
guestuser1
Posts: 2
Joined: Fri Jul 11, 2008 3:20 am

Display Script Output

Post 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.

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: Display Script Output

Post 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

guestuser1
Posts: 2
Joined: Fri Jul 11, 2008 3:20 am

Re: Display Script Output

Post 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.

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: Display Script Output

Post 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 ?

Post Reply