Forum Moderators: open

Message Too Old, No Replies

A loading message in the status bar (% completed)

Could you help me out with some code

         

rootj4m13

9:14 pm on Oct 16, 2005 (gmt 0)

10+ Year Member



I came across a code a while back that told you how much a page had loaded in the status bar in % and fore evry 1% it added a pipe to it ( ¦ ) i had the code but formatted and lost it i was wondering if anybody could help me out. I am notsure what language it was it may have been Vbscript not too sure.
Thanks in a advance
Jamie :D

BlobFisk

9:00 am on Oct 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld, rootj4m13!

That is no easy thing to do in software in general, never mind on a webpage! On desktop applications the progress bar is never fully accurate - the system is constantly recalculating and reestimating the time left. It is judged on the number of files to process, so if the first of 20 takes 1 second to process then the system estimates 19 seconds remaining. However, the second file may take a minute to process so this throws everything out! That is why you can see readjustments and progress hanging at 99% for a while!

On a webpage the browser knows what files to bring in, but not their filesize. Also, network traffic can affect the time.

However, browsers have their own progress bar in the status bar - why duplicate this functionality?

borninblood

10:19 am on Oct 17, 2005 (gmt 0)



There is a progress bar styled thing you can use in JavaScript, but I am not sure how you would link it in with the rest of your page.

What content are you trying to load that requires the user to see how far along it is?

rootj4m13

2:59 pm on Oct 17, 2005 (gmt 0)

10+ Year Member



I am just going to put it on my gallery which has some alre images on it i just wanted it for users still on dial-up. I have seen it done. I had the script and tested it on a balank page itw wnet in less than a second and with an massive image it showed a very accurate ( i would say) of the percentage loaded. No one else seen it?
Thanks anyway