Image Ready Rollovers

M

Magic-chef

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].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>
 
E

Evertjan.

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">
 
M

Magic-chef

Evertjan. said:
Magic-chef wrote on 28 jun 2003 in comp.lang.javascript:



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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top