Display "in progess" message whilst form is submit

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dickey
Forum Commoner
Posts: 50
Joined: Thu May 16, 2002 8:04 pm
Location: Sydney, Australia

Display "in progess" message whilst form is submit

Post 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.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post 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
efair
Forum Newbie
Posts: 4
Joined: Wed Jul 31, 2002 3:00 pm

Post 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
dickey
Forum Commoner
Posts: 50
Joined: Thu May 16, 2002 8:04 pm
Location: Sydney, Australia

Further Questions

Post 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?
efair
Forum Newbie
Posts: 4
Joined: Wed Jul 31, 2002 3:00 pm

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