Lunarpages Web Hosting Forum

Author Topic: Javascript issues...preload images???  (Read 2275 times)

Offline absolutezero3424

  • Spaceship Navigator
  • *****
  • Posts: 97
    • The Apostolics of Taylor
Javascript issues...preload images???
« on: June 26, 2006, 08:09:36 AM »
could someone look at my page at:

www.apostolicsoftaylor.com/beliefs.htm

and tell me why the rollover images don't preload like
they're supposed to....my understanding of preload is
that I shouldn't have to wait several seconds for an image
to load after I rollover it because it was loaded at the same
time as the rest of the initial content
and was just waiting
to be activated (ie. rolled over!), but that I shouldn't notice
any "loading" time after the initial page loads to load
these rollover images separately!  Am I wrong in this
assumption?  seems logical to me!  but it doesn't seem to work
that way.....someone please check this out and tell me what I'm
doing wrong? 

in any event, the feature I want to accomplish
is that I don't want to have to wait for these rollover images to
load when I rollover them, I want them to load the same time
the initial content loads....otherwise, you kinda lose the effect and people get
tired of waiting!

I know not all those links work, in fact, most don't, so don't worry about that!
« Last Edit: June 26, 2006, 08:11:17 AM by absolutezero3424 »

Offline GMTurner

  • Berserker Poster
  • *****
  • Posts: 7479
    • Turner's Lounge
Re: Javascript issues...preload images???
« Reply #1 on: June 26, 2006, 08:32:25 AM »
it seemed to be working the way I would expect... basically, the pre-loading means that you're loading the images before they are rolled over... but it still takes time to download all the images and the page content will be displayed while this is going on in the background... so if you roll over an image right as the page displays, it is still loading things in the background and you are just moving to fast for it :)  Using smaller images or accomplishing the rollover effect in other ways can avoid some of this... connection speed will also be an issue. (I only noticed it on 1 or 2 that I rolled over while things were still loading...)

Actually, just took a little closer look at the code and not sure if all the roll over images are set to pre-load... there are a lot images on the page when you take into account all the menu images... without looking even closer at the javascript code it's hard to say for sure...

Oh, and there's something about clicking on God and being told Coming Soon... :)


The above information may or may not reflect current policy, opinions, or views since it was likely made almost 10 years ago.

Offline absolutezero3424

  • Spaceship Navigator
  • *****
  • Posts: 97
    • The Apostolics of Taylor
Re: Javascript issues...preload images???
« Reply #2 on: June 26, 2006, 11:11:27 AM »
 :) 

that last part was hysterical and I didn't even make the connection.....but I do believe that though  :yey: 

well, what is the code to pre-load images??? I always use DW to choose that option, but I want to go in and make sure it's hard-coded into the page!

I could let a page load fully and wait for a minute or so with a high-speed connection and then rollover an image and still have to wait for it....I don't believe they are preloading like they should be!  I'm not being antsy when I check...

Offline absolutezero3424

  • Spaceship Navigator
  • *****
  • Posts: 97
    • The Apostolics of Taylor
Re: Javascript issues...preload images???
« Reply #3 on: June 27, 2006, 06:32:48 AM »
don't forget about me!!!

if someone could give me the code to "pre-load" images for Javascript I would appreciate....I'm sure it's pretty simple, like adding an attribute to a tag or something!

Lupine1647

  • Guest
Re: Javascript issues...preload images???
« Reply #4 on: June 27, 2006, 06:36:29 AM »
Hello:
More like the board forgot about you, heh(sometimes the new topic notification thing doesn't work all the time). I came across a few articles/scripts from a Google search.
http://www.pageresource.com/jscript/jpreload.htm
http://javascript.internet.com/generators/preload-images.html
http://www.netmechanic.com/news/vol6/css_no18.htm

I hope this helps.