November 18th, 2001, 11:37 PM
I am trying to include a button in my webpage so that wen I upload a file, the instance of the button changes to provide them with a message that the file is uploading.
However, this does not appear to work in netsape 4.7. So what I would like to do is to display the message in the status bar also while the instance has changed. The code I use is as follows:-
If someone could have a look at this for me and let me know what I need to do to include the status bar message while the file is uploading, and then retuning a false value to clear it when it has completed and the page has reloaded.
<input onclick="if(this.value=='Please Wait Uploading....')return(false);if((document.AV_LOADED!=null)&&!AV_onSubmit(this.form))return(false);this.value='Please Wait Uploading....';" type="submit" value="UPLOAD NOW">
November 19th, 2001, 12:54 AM
File upload confirmation is a server-side process; generating confirmation messages on the client is pretty pointless. Since you're loading a new page (the form's action attribute) all running scripts are lost when the document is cleared.
Maybe this'll help - otherwise you might try the server-side forums:
November 19th, 2001, 04:20 PM
Hey tere, the Uploading of the file is not the problem, that is occuring correctly and working fine. While the file is uploading, the above code changes the cutton to say 'Please wait Uploading....', instead of the chosen Upload Now Status. However, the changing of the button fails to work in netscape 4.7, so I thought that in conjunction with changing the Button status, that I change the status bar on the bottom of the browser to say they same thing while the file is uploading and the page refreshes.
I have managed to get this status to appear while the file is upload, however I have been having problems with getting window.status returning a flase or null value when the page is refreshed. if you can understand what I mean.
Thanks, hopes this clarifies a little more.
November 19th, 2001, 04:32 PM
Well, I'm a little confused here...
The for loop is just a delay for demo purposes.
<form enctype="multipart/form-data" method="post"
<input name="up" type="file"><br>
<input name="sub" type="submit" value="UPLOAD NOW">
There are other ways to do this as well; the status line is often the last place anybody looks (*teeny*)
November 19th, 2001, 05:48 PM
Ok then. so what you are saying is do not worry about the Netscape users to the site?
I would have loved to have done something for them, but if it is not really possible then I will not worry about it.
November 19th, 2001, 06:17 PM
You could try
in the Button code.
November 19th, 2001, 06:22 PM
The above does update the button, in my testing (NS4.76/Windows 2000)...are you talking about the "browse" button? - its legend is hardwired; its .value property refers to the file selected (read-only).
Last edited by adios; November 19th, 2001 at 06:24 PM.
November 19th, 2001, 06:46 PM
No, sorry I am not talking about the browse button I am talking about the submit button.
What the code does:-
<input onclick="if(this.value=='Please Wait Uploading....')return(false);if((document.AV_LOADED!=null)&&!AV_onSubmit(this.form))return(false);th is.value='Please Wait Uploading....';" type="submit" value="UPLOAD NOW">
Is when the user has browsed for the file to upload and selected this. They click on the submit button, or in this case 'UPLOAD NOW'.
What I am trying to acheive is that, because in netscape 4.7 the button does not change, I wanted to include a little bit more JS on the button to ALSO display the 'Please Wait Uploading...' in the status bar of the browser while the submited form file is being copied to the web server.
I hope that this is making a little more sense... sorry for any confusion.