Page 1 of 1

Display "in progess" message whilst form is submit

Posted: Wed Jul 31, 2002 9:00 pm
by dickey
I have two files selectfile.php and uploadfile.php.

The first has a form in which the user browses for a file, then submits the form to upload the selected file to our server. The second file is the response to the first file and performs validations, copies the file to a permanent loc etc.

Submitting the form may take some time dependant on file size.

I'd like the user to have some indication that the upload is progressing between the instant they hit the upload/submit button, and the call to the response file once upload has completed.

A message saying 'file upload in progress' would suffice.

Any assistance will be greatly appreciated.

Posted: Wed Jul 31, 2002 9:29 pm
by volka
may be wrong but I think
  • you can't send output while a file-upload is in progress, because your script isn't running at this time
  • IE has an indicator for the progess

Posted: Wed Jul 31, 2002 9:40 pm
by efair
Half-baked idea: How about opening a new window that reloads itself every 10 seconds, and that downloads an animated gif that blinks or winds the clock hands around until the upload is complete?

ed

Further Questions

Posted: Wed Jul 31, 2002 11:20 pm
by dickey
I like the idea of opening another window (a pop-up), but this raises several issues:

Can you provide some more assistance on how to go about it?

Posted: Fri Aug 02, 2002 9:28 pm
by efair
You could:
1) change the <form> tag to <form location=_blank>
2) put in a <script language=javascript> that includes window.open("blinkAndReload.htm")
3) Change the <form> tag to include an onSubmit= event handler that opens a new window.

I'm sorry I haven't worked out a complete answer for you.

ed