javascript Blues....
Jay Frantz
jay at ccpl.ci.corpus-christi.tx.us
Sun Mar 7 12:58:40 EST 1999
I've got the nasty low-down mind-messin' javascripts blues. the following
code is for a simple mouseover. It works in Netscape, but IE 4.0 won't
read it. If anyone is saavy please feel free to enlighten me.
It follows:
<script language="JavaScript">
<!--
if (document.images) {
image1on = new Image();
image1on.src = "../images/libin3.gif";
image2on = new Image();
image2on.src = "../images/libcat3.gif";
image3on = new Image();
image3on.src = "../images/ya3.gif";
image4on = new Image();
image4on.src = "../images/lohis3.gif";
image5on = new Image();
image5on.src = "../images/reference3.gif";
image1off = new Image();
image1off.src = "../images/libin.gif";
image2off = new Image();
image2off.src = "../images/libcat.gif";
image3off = new Image();
image3off.src = "../images/ya.gif";
image4off = new Image();
image4off.src = "../images/lohis.gif";
image5off = new Image();
image5off.src = "../images/reference.gif";
}
function changeImages() {
if (document.images) {
for (var i=0; i<changeImages.arguments.length; i+=2) {
document[changeImages.arguments[i]].src =
eval(changeImages.arguments[i+1] + ".src");
}
}
}
// -->
</script>
</head>
<body>
<table width=NaN border=0 cellpadding=0 cellspacing=0>
<tr><td width=NaN><a href="http://www.coffeecup.com/order"
onMouseOver="changeImages('image1', 'image1on')"
onMouseOut="changeImages('image1', 'image1off')"><img name="image1"
src="../images/libin.gif" alt="Libray" width= height=
border=0></a></td></tr>
<tr><td width=NaN><a href="" onMouseOver="changeImages('image2',
'image2on')" onMouseOut="changeImages('image2', 'image2off')"><img
name="image2" src="../images/libcat.gif" alt="" width= height=
border=0></a></td></tr>
<tr><td width=NaN><a href="" onMouseOver="changeImages('image3',
'image3on')" onMouseOut="changeImages('image3', 'image3off')"><img
name="image3" src="../images/ya.gif" alt="" width= height=
border=0></a></td></tr>
<tr><td width=NaN><a href="" onMouseOver="changeImages('image4',
'image4on')" onMouseOut="changeImages('image4', 'image4off')"><img
name="image4" src="../images/lohis.gif" alt="" width= height=
border=0></a></td></tr>
<tr><td width=NaN><a href="" onMouseOver="changeImages('image5',
'image5on')" onMouseOut="changeImages('image5', 'image5off')"><img
name="image5" src="../images/reference.gif" alt="" width= height=
border=0></a></td></tr>
</table>
Thanks in advance..
Jay H. Frantz,
Webmaster
More information about the Web4lib
mailing list