Print Page | Close Window

Preloading images and IE Windows

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Web Design Discussion
Forum Description: Discussion on web design and development subjects.
URL: https://forums.webwiz.net/forum_posts.asp?TID=5229
Printed Date: 28 March 2026 at 9:10pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Preloading images and IE Windows
Posted By: poolings
Subject: Preloading images and IE Windows
Date Posted: 23 August 2003 at 5:05pm

Hi. I have encountered a pretty unique problem, in my experience at least. I am using onmouseovers for my buttons on my site. In order to make it a smooth transition between the images, I am using a preloading image script. Everything is fine and dandy until I invoke a Right-click -> Open in new Window or one of my links uses target="_blank".

So the new window opens and then I switch back to my webpage. Now, the onmouseover transitions are not smooth. It seems like I never preloaded my images in the first place! I've tested my webpage on three separate computers and the result is the same.

Does anyone know how to resolve this problem?




Replies:
Posted By: abhinav
Date Posted: 23 August 2003 at 10:56pm
what's the site address?

-------------
http://www.sgkabra.com - Accountancy Firm | http://www.mp3oldies.com.ar - Mp3 Oldies | http://www.best-mp3software.com - Mp3 Software


Posted By: KCWebMonkey
Date Posted: 24 August 2003 at 10:49pm

you will have to supply more info...

Can you post the script you use to preload the images, or like abhinav said, post the site address?



Posted By: 3BEPb
Date Posted: 26 August 2003 at 4:12pm

The simlest preloader I use is:

<SCRIPT LANGUAGE="JavaScript"><!--

Image1= new Image(55,61)
Image1.src = "images/front/b1_on.gif"

Image2= new Image(55,61)
Image2.src = "images/front/b2_on.gif"

Image3= new Image(55,61)
Image3.src = "images/front/b3_on.gif"

Image4= new Image(170,36)
Image4.src = "images/front/shop/shop_on.gif"

//-->
</SCRIPT>



Posted By: poolings
Date Posted: 28 August 2003 at 2:31am

Hi. Sorry for the late reply. I've been away. The preload script I use is here. http://www.dynamicdrive.com/dynamicindex4/preloadimage2.htm - http://www.dynamicdrive.com/dynamicindex4/preloadimage2.htm

And the mouseover code I use is here. It is all contained in the <a href> tag.

<a href="home.htm" onMouseOver="home.src='interface/obutn_home.gif'; return true;"
    onMouseOut="home.src='interface/butn_home.gif'; return true;">
   <img border="0" name="home" src="interface/butn_home.gif" width="46" height="20"></a>

The images preload fine, but as I have said before, if I right click on a link and choose "Open link in a new window" or click on a link that has target="_blank," which opens a totally different page, then switch back to my page, the mouseovers will not be smooth.

I have researched other preload scripts and have ended up with the same results. I don't know what the problem is. It may be the way the preload script stores images into cache.

An example of what I'm talking about is

http://acm.cecs.csulb.edu - http://acm.cecs.csulb.edu

Once the page loads up, run the mouse over the buttons. All buttons smoothly change. Now go to the links pages, and click on any of the links (they are coded with). Now switch back to the ACM webpage and run the mouse of the buttons. They will no longer switch. Weird ain't it?



Posted By: 3BEPb
Date Posted: 02 September 2003 at 2:20am

Can you give us a link to your page, plz?

p.s. I personally don't like syntax you use, like

onMouseOver="home.src='interface/obutn_home.gif'; return true;"

In this case I'll prefer to write as follows:

onMouseOver=home.src="interface/obutn_home.gif"



Posted By: KCWebMonkey
Date Posted: 02 September 2003 at 7:55am
Originally posted by poolings poolings wrote:

An example of what I'm talking about is

http://acm.cecs.csulb.edu - http://acm.cecs.csulb.edu

Once the page loads up, run the mouse over the buttons. All buttons smoothly change. Now go to the links pages, and click on any of the links (they are coded with). Now switch back to the ACM webpage and run the mouse of the buttons. They will no longer switch. Weird ain't it?

Works for me.




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net