f



Image Ready Rollovers

This rollover script is created by Image Reaady.  When using IE and 
especially with Win XP the images involved in the rollover disappear. 
It happens gradually with one or two at first then all.  Even a browser 
refresh does not bring the images back.

I there a problem known issue with Image Ready rollover scripts and IE+XP?

<script TYPE="text/javascript">
<!--
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		login_over = newImage("images/login-over.jpg");
		join_over = newImage("images/join-over.jpg");
		
Snip out several image preloads

		preloadFlag = true;
	}
}

// -->
</SCRIPT>

0
Magic
6/28/2003 3:31:48 PM
comp.lang.javascript 38370 articles. 2 followers. javascript4 (1315) is leader. Post Follow

2 Replies
550 Views

Similar Articles

[PageSpeed] 21

Magic-chef wrote on 28 jun 2003 in comp.lang.javascript:
> I there a problem known issue with Image Ready rollover scripts and
> IE+XP? 

No, not to me.

Why not keep it simple:

<img src="img1.jpg"
onmouseover="this.save=this.src;this.src='img1a.jpg'"
onmouseout="this.src=this.save">
<img src="img1a.jpg" width=0 alt="preloader">
           <br>
<img src="img2.jpg"
onmouseover="this.save=this.src;this.src='img2a.jpg'"
onmouseout="this.src=this.save">
<img src="img2a.jpg" width=0 alt="preloader">



-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
0
Evertjan
6/28/2003 3:42:46 PM
Evertjan. wrote:
> Magic-chef wrote on 28 jun 2003 in comp.lang.javascript:
> 
>>I there a problem known issue with Image Ready rollover scripts and
>>IE+XP? 
> 
> 
> No, not to me.
> 
> Why not keep it simple:
> 
> <img src="img1.jpg"
> onmouseover="this.save=this.src;this.src='img1a.jpg'"
> onmouseout="this.src=this.save">
> <img src="img1a.jpg" width=0 alt="preloader">
>            <br>
> <img src="img2.jpg"
> onmouseover="this.save=this.src;this.src='img2a.jpg'"
> onmouseout="this.src=this.save">
> <img src="img2a.jpg" width=0 alt="preloader">
> 
> 
> 

So, I would use the preload function just as it is and scrap the 
newimage function.  The new image is replaced by onmouse*= in the image 
tags.

Please excuse me as I am just starting to learn Javascript.

0
Magic
6/28/2003 4:37:14 PM
Reply: