Re: Anyone have any ideas on a upload progress bar???

From: Date: Thu, 07 Dec 2000 17:08:31 +0000
Subject: Re: Anyone have any ideas on a upload progress bar???
Groups: php.general 
Request: Send a blank email to php-general+get-29176@lists.php.net to get a copy of this message
I'm thinking this through as I write. 1. how does the browser get the percent 2. how does the browser update it as it changes 3. how does the browser present it First thought is to use browser-side javascript with a timer to continually update the page contents with image replacement based on percent complete. Assuming the progress bar appears as a solid area of color, the images don't have to be huge -- scale them using height= and width= tags. As the percent complete changes, perform image replacement to show the correct percentage. To keep from having to load a hundred images, I would limit this to every 5%. To me, javascript is a dicey proposition (given incomplete/misleading doc, spotty Mac implementation, and Microsoft's desire to define their own standards), and I wouldn't want to do this unless I could actually test my code on all target browsers on all target operating systems. You could define a page with a short expiration time META tag (like 5 seconds), and have it redirect to itself, again with a browser-side META tag. This page would be a PHP script which goes to the file system, compares the size-so-far of the uploaded file with the expected actual size, then generates the relevant status indicator. This would give you finer resolution of the status bar (down to the 1-percent increment) and avoid javascript. I would also consider opening a new window to show the status bar, so the user can keep on doing things in the main browser window while their file uploads. If you would, please let me know how this works out. I'll need to do the same thing in the future, and I'd like to hear about your experience as code probe! :) At 11:52 AM 12/7/2000 -0500, Tim Meader wrote: >Certainly. They would be Netscape 4.x on Unix, Mac, and PC, with a >possibility of IE4-5 on the Mac or PC. Very unlikely on the Mac however. >Thanks in advance. > >On Thursday 07 December 2000 11:42 am, you wrote: >> Can you define the browser types in your target audience? >> > >-- > >Tim Meader >ACS GSG >tmeader@cne-odin.gsfc.nasa.gov > ...................................................................... Les Neste Cellphone 678-778-0382 Web http://www.lesneste.com

« previous php.general (#29176) next »