Hi, Right i have a form which submits to an uploading script and what i need is to display animated.gif while the file uploads. Any ideas? Cheers, Adam
You have show a hidden div on form submit, which holds an image or whatever. That belongs into JavaScript though. <div id="loading" style="display: none;"><img src="loaing.gif" /></div> <form action="" method="" onsubmit="document.getElementById('loading').style.display = 'block';"> HTML:
Thanks a lot for that, do you know how i would i go about doing something like the lightbox script so when the users submits it adds a black overlay to the site and puts the loading.gif in the middle.
If you do the javascript hidden div trick, your first problem you will run into is how long to keep the animated gif running. Bigger files might take 30 seconds while tiny ones take only 2. To point you in the right direction, you did post this in the wrong section. For some reason or another php does not give you access to the % of file uploaded so you can give an ETA and show the animated gif for the correct time ... Perl does. A little javascript is necessary also for the hidden div's so you end up with an AJAX solution. I can't find the old tutorial I used years ago but this one seems pretty competent. http://www.srmiles.com/freestuff/ajax_file_uploader/ Enjoy, You've got a fun night ahead of you. Very gratifying to get something like this working.