Progress bar help

liunx

Guest
Hi<br />
<br />
My site is built from at present 170 jpeg images, now I`ve setup a preloader for images that are used on rollover and backgrounds but I would like to have a progress bar when you hit my site...example: you hit my site and the bar appears but nothing else and then when all the main images are loaded the site appears, I`m sure theres a way around this but I have no idea, can anyone help me out here?<br />
<br />
Dean<!--content-->What you need to add is some java-script that relocates on successful preloading & shows the progress...<br />
<br />
So if you know a little java-script code you can alter your preloaded, firstly add a variable to get the total files you are loading if not already, i fit's an array of files get the array length, next a variable to count as it loads, when that == the length of your array use an if statment to redirect to next page like:<br />
<br />
if(count==array.length) {window.location="nextpage.html"}, <br />
<br />
you'll have to put it at the end of your while or do loop for preloading, if you need more help have a browes through these sites & get some examples to walk you through it or one that will do it all for you:<br />
<br />
JS-Examples (<!-- m --><a class="postlink" href="http://www.js-examples.com/js/">http://www.js-examples.com/js/</a><!-- m -->) <br />
<br />
Java-Script Kit (<!-- m --><a class="postlink" href="http://javascriptkit.com/">http://javascriptkit.com/</a><!-- m -->) <br />
<br />
Make sure you choose java-script b4 searching on this one!<br />
Planet Source (<!-- m --><a class="postlink" href="http://www.planet-source-code.com/">http://www.planet-source-code.com/</a><!-- m -->) <br />
<br />
happy coding... jaeman<!--content-->TY for getting back to me, I`m alittle lost...I understand what you`re saying but it`s beyond me at the mo, I work better with examples so I can pull them apart and find out how they work, I`m checking the sites you`ve listed, ty again.<!--content-->If you get stuck let me know & i'll help you with your script, if you can, attach or copy & paste your preload script so i can get a better understanding of what i'm working with... jaeman;)<!--content-->I will, TY for your help.<!--content-->the only way to do what you want is to use flash. you cannot have a progress bar and the site not load. well you can but you have to load 2 different pages.<br />
<br />
what you want is impossible with javascript.<!--content-->What i was thinking was a blank page with only a progress bar showing while the preloader loads, then on success redirecting to the next page... jaeman<!--content-->yes that will work but what he wants is 1 page, I believe.<br />
<br />
then what good will it do if the user has to load 2 pages.<!--content-->One of these days i'll post a reply that no-one corrects for me:rolleyes:, no only joshing, the more feedback the better... jaeman:P<!--content-->
 
Back
Top