Closed Thread Icon

Topic awaiting preservation: JS image rollover question (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=8383" title="Pages that link to Topic awaiting preservation: JS image rollover question (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: JS image rollover question <span class="small">(Page 1 of 1)</span>\

 
Rooster
Bipolar (III) Inmate

From: the uterus
Insane since: Nov 2002

posted posted 11-10-2002 06:08

I wrote a rather intricate JavaScript image rollover module. But, I seem to be having some problems with the image preloading.

To try to debug the script I have done the usual: isolate the apparent problem.

So...

I?ve set up two test pages, each on a different web server, each server managed by a different hosting company.
http://homefiredesign.com/dynimg.htm
http://efs1.com/hfd/dynimg.htm

The code for both pages are exactly the same. Yet, the rollovers located on the first server, do not preload. Or they just seem like they don?t preload.

And if you look at the rollovers located on the second server, they work exactly the way I?ve intended. Maybe I have something going on with my connection, please verify that you have the same problem??

Maybe there?s something bad with the script I wrote. But then why would it work correctly on one server and not the other?

Maybe one server is faster then the other and the images DL faster. But then why aren?t the images preloading in the first place? or are they?

Honestly, I just signed up for the first web host and I?m not sure if I have the whole thing set up right.

Any idea?s what could be wrong?

~~~

Also, if take the page on the ~slow~ server and link to the images located on the ~fast~ sever...

i.e. <img src=?~fast server~?>

Here.... http://homefiredesign.com/dynimg2.htm

Then the problem goes away??????

[This message has been edited by Rooster (edited 11-10-2002).]

[This message has been edited by Rooster (edited 11-10-2002).]

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 11-11-2002 01:26

Hokay it's not (really) a server issue I'm guessing. What is probably happening is that the images are in fact not getting preloaded.

First a couple of things when we look at these things it's easier if the JS is in the page. And if you could turn of the status part that would help too.

Anyway if you are using IE check your caching settings if you have ie set to check for page updates on every visit to the page then image preloading is not going to work. This only works (I think ) on the last 2 settings.




.:[ Never resist a perfect moment ]:.

Rooster
Bipolar (III) Inmate

From: the uterus
Insane since: Nov 2002

posted posted 11-11-2002 02:08

Okay, I placed the JS in the same page and commented out the status bar sections.

Sorry, I wasn?t really sure which way people would rather view the JS. I probably should have put it in the same page in the first place??

I am using IE but I don?t have it configured to check for updates on every visit. I also tried changing the setting to ?never? then view the pages, but I still came up with the same problem.

I?m also curious if you can see any (at all) drag caused by DL on the page that works correctly? Maybe I just have a fast connection where I?m at, but I think there would be at least a small amount of drag if the images weren?t actually getting preloaded. Wouldn?t there be?

I?m not sure what else the problem could be though??


bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 11-11-2002 02:17

Alright that is wierd. Now I'm on DSL too so it's kinda hard to see. But I'm definately getting a difference between the two and the first seems to be downloading every time too.

Hmm this is an interesting method of doing things. I'm just wondering if for some reason it's resetting the imagesClass each time but I'm not sure. Gonna take more playing.



.:[ Never resist a perfect moment ]:.

Rooster
Bipolar (III) Inmate

From: the uterus
Insane since: Nov 2002

posted posted 11-12-2002 01:46

Okay, I?m not sure what else to do??

I rewrote the pages this time using the example code located on the Doc?s JS rollover tutorial, http://www.handson.nu/CODING/javascript.shtml

I now know that the images are getting preloaded correctly, but I still have the same problem.

The page on this server http://homefiredesign.com/dynimg3.htm tries to download the already preloaded images every time the image source gets changed.

Yet when I put the same page on this server http://efs1.com/hfd/dynimg3.htm it magically works correctly.

The problem also only has to do with where the actual images are located. If I put the HTML on the bad server and link to the images located on the good server, the problem goes away.

Doesn?t anyone have even the slightest idea what could be wrong?


« BackwardsOnwards »

Show Forum Drop Down Menu