PDA

View Full Version : Contractible Headers with Dynamic Progress Bar



drick
01-22-2007, 08:10 PM
1) Script Title:
Contractible Headers script
Preload Image With Update Bar Script
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex1/navigate2.htm
http://www.dynamicdrive.com/dynamicindex4/preloadimage.htm

3) Describe problem:

I am using the Contractable Headers script but modified it to use thumbnail images instead of text. This makes for wonderful navigation. The only problem is that the tables are completely unusable until all the thumbnails are loaded. To the average person visiting the site, this may seem like something is wrong. I wanted to add some kind of preloading feature so people would at least know what is going on. I tried a few. The problem is that the page with the Contractable Headers seems to be forcing a reload, so if the previous page preloaded the images, they would be loading all over again. I hope this makes sense.

you can go to my site and see. here (http://www.enriquepina.com) (of course, i've been messing with this so much that now the page doesn't link correctly

you can just jump the the main page here http://www.enriquepina.com/EnriquePina.htm (please notice that while things are loading in the status bar, you cannot use the navbar.

jscheuer1
01-22-2007, 08:29 PM
Preloading can get tricky but, to start out with the image array isn't being recognised so, the script isn't preloading anything. You cannot have the final comma in the array:


. . . ent/Archive/Drauga_th.jpg",
"http://www.enriquepina.com/Content/Archive/HulkRampage_th.jpg",
"http://www.enriquepina.com/Content/Archive/Yeti_th.jpg",)

There could be other problems.

drick
01-22-2007, 10:05 PM
thanks for the quick reply. i tried that and it seemed to partly worked. now i am getting the bar to animate but it fails to jump to the next screen. I'm sure thats a minor little detail like the last one but what concerns me most is that if you let is load as much as it can, tell it to skip the loading, it takes you to the main page and loads all over again. does the Contractible Headers script force a reload everytime that page loads?

jscheuer1
01-22-2007, 11:23 PM
If your using IE, the fact that you say, "Loads as much as it can", means that one or more of your images is not where it says that it is in the array. That image or images isn't getting preloaded. In Opera or FF, which will not hang up in preload if an image is missing, the page does finish preloading and switches over to the next page as it should. When I do switch over to the next page now, in any browser, most of the images are preloaded, there are only a few that are not. These are the ones missing from the array either via having been omitted from it or because their locations in the array are listed incorrectly.

Added later:

This entry (#30 or the 31st one) in the array, is the only invalid image I could find:


http://www.enriquepina.com/Content/2d/rancor_th

Any other images that aren't being preloaded must simply be missing from the array or they may be in more than one location on the server. Preloading an identical image from one location will not cache it for use from another location.

drick
01-23-2007, 03:40 PM
Thanks alot. that fixed it. everything is loading perfectly!!