Question

Locked

mouseover producing multiple images works in Firefox, but not i.e.

By tcantrel ·
The code below allows the user to hover over 1 object and it not only replaces the object but also shows an additional object between the buttons.

It works great in Firefox, but does not in Internet Explorer.

I have no idea why the "(d" in document is showing up as a <. sorry

HELP

webpage:
http://www.isp.ucar.edu/

Thx,
Terri

___________________________
// JAVASCRIPT
// Mouseover 1 item & show 2 items


if (document.images) {

img1on = new Image();
img1on.src = "images/buttons/button-beachon-on.gif";
img1off = new Image();
img1off.src = "images/buttons/button-beachon.gif";

img2on = new Image();
img2on.src = "images/buttons/button-bgs-on.gif";
img2off = new Image();
img2off.src = "images/buttons/button-bgs.gif";

img3on = new Image();
img3on.src = "images/buttons/button-iam-on.gif";
img3off = new Image();
img3off.src = "images/buttons/button-iam.gif";

img4on = new Image();
img4on.src = "images/buttons/button-nvia-on.gif";
img4off = new Image();
img4off.src = "images/buttons/button-nvia.gif";

img5on = new Image();
img5on.src = "images/buttons/button-utls-on.gif";
img5off = new Image();
img5off.src = "images/buttons/button-utls.gif";

img6on = new Image();
img6on.src = "images/buttons/button-water-on.gif";
img6off = new Image();
img6off.src = "images/buttons/button-water.gif";

img7on = new Image();
img7on.src = "images/buttons/button-exploratory-on.gif";
img7off = new Image();
img7off.src = "images/buttons/button-exploratory.gif";


// second image that does not appear in original button space
img1ad = new Image();
img1ad.src = "images/buttons/beachon-overview-sm.gif";

img2ad = new Image();
img2ad.src = "images/buttons/bgs-overview-sm.gif";

img3ad = new Image();
img3ad.src = "images/buttons/iam-overview-sm.gif";

img4ad = new Image();
img4ad.src = "images/buttons/nvia-overview-sm.gif";

img5ad = new Image();
img5ad.src = "images/buttons/utls-overview-sm.gif";

img6ad = new Image();
img6ad.src = "images/buttons/water-overview-sm.gif";

img7ad = new Image();
img7ad.src = "images/buttons/exploratory-overview-sm.gif";
}





function imgOn(imgName) {
if (document.images) {
document[imgName].src = eval(imgName + "on.src");
document["holder"].src = eval(imgName + "ad.src");
}
}
function imgOff(imgName) {
if (document.images) {
document[imgName].src = eval(imgName + "off.src");
document["holder"].src = "images/buttons/isp-overview-sm.gif";
}
}

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Share your knowledge
Back to Browser Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums