Wait for your upload to finish type thingy...

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
User avatar
seodevhead
Forum Regular
Posts: 705
Joined: Sat Oct 08, 2005 8:18 pm
Location: Windermere, FL

Wait for your upload to finish type thingy...

Post by seodevhead »

Hey guys..

I have a script that is basically a form that allows people to upload 5 to 10 photos to the site. It's pretty standard form handling... they just hit the "Browse.." button for their uploads and then they just hit the form submit button and wait for the page to reload.

The problem is, a lot of users are trying to upload 10 big photos but aren't waiting the proper amount of time for the upload to finish. They will hit the submit button and in about 10 seconds, they don't see anything happen and think they need to hit the submit button again... when really they just need to wait a minute or two for their upload to finish.

Is there any easy way I can make it so that when a user hits the submit button, a little unobtrusive popup comes up with a progress bar or something.. anything of this nature... just to let people know their uploads are being uploaded. Of course.. the form posts to another script URL so I want the page to reload when the uploads are finished.

Any idea what the easiest implementation of something like this is? Thanks for any guidance.
User avatar
bovermyer
Forum Commoner
Posts: 25
Joined: Tue Apr 08, 2008 9:14 am
Location: South Dakota

Re: Wait for your upload to finish type thingy...

Post by bovermyer »

AJAX will do this, though if JavaScript is disabled on the user's browser then it will still display nothing.

MooTools is a good starting point if you want to do some quick, easy AJAX. I think there's even a progress bar tutorial somewhere on the Web for MooTools. Link - http://mootools.net/
Post Reply