Article View: aus.computers.java
Article #1202On mouseover is showing
From: Geoff
Date: Sun, 11 Jul 1999 00:00
Date: Sun, 11 Jul 1999 00:00
114 lines
4240 bytes
4240 bytes
I am an absolute java beginner - I wanted to do mouseover for my page so I
went to builder.com's mouseover machine. it worked now worries. I even
managed to add 5 more links OK except...
whenever I refresh the page (it's not up on the www with mouseover yet, for
this reason) all the On images ie: the ones that are only supposed to show
up when the mouse passes over the image, appear, except the top image, which
appears as Off.
If I then move the mouse over them, the On images work as they should.
the code is below - I don't really understand how it works, so I'd really
appreciate some advice on why this is happening and how to fix it
Karen
<html><head><title></title>
<script language="JavaScript">
<!--
if (document.images) {
image1on = new Image();
image1on.src = "chin4.jpg";
image2on = new Image();
image2on.src = "club2.jpg";
image3on = new Image();
image3on.src = "fast2.jpg";
image4on = new Image();
image4on.src = "ital2.jpg";
image5on = new Image();
image5on.src = "turk2.jpg";
image6on = new Image();
image6on.src = "viet2.jpg";
image7on = new Image();
image7on.src = "srch2.jpg";
image1off = new Image();
image1off.src = "chin3.jpg";
image2off = new Image();
image2off.src = "club1.jpg";
image3off = new Image();
image3off.src = "fast1.jpg";
image4off = new Image();
image4off.src = "ital1.jpg";
image5off = new Image();
image5off.src = "turk1.jpg";
image6off = new Image();
image6off.src = "viet1.jpg";
image7off = new Image();
image7off.src = "srch1.jpg";
}
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="chinese.htm" onMouseOver="changeImages('image1',
'image1on')" onMouseOut="changeImages('image1', 'image1off')"><img
name="image1" src="chin3.jpg" alt="Chinese & Asian" width=125 height=25
border=0></a></td></tr>
<tr><td width=NaN><a href="club.htm" onMouseOver="changeImages('image2',
'image2on')" onMouseOut="changeImages('image2', 'image2off')"><img
name="image2" src="club2.jpg" alt="Clubs" width=125 height=25
border=0></a></td></tr>
<tr><td width=NaN><a href="fastfood.htm"
onMouseOver="changeImages('image3', 'image3on')"
onMouseOut="changeImages('image3', 'image3off')"><img name="image3"
src="fast2.jpg" alt="Fast Food" width=125 height=25 border=0></a></td>
</tr><tr><td width=NaN><a href="italian.htm"
onMouseOver="changeImages('image4', 'image4on')"
onMouseOut="changeImages('image4', 'image4off')"><img name="image4"
src="ital2.jpg" alt="Italian" width=125 height=25 border=0></a></td></tr>
<tr><td width=NaN><a href="turkish.htm" onMouseOver="changeImages('image5',
'image5on')" onMouseOut="changeImages('image5', 'image5off')"><img
name="image5" src="turk2.jpg" alt="Turkish" width=125 height=25
border=0></a></td></tr>
<tr><td width=NaN><a href="vietnamese.htm"
onMouseOver="changeImages('image6', 'image6on')"
onMouseOut="changeImages('image6', 'image6off')"><img name="image6"
src="viet2.jpg" alt="Vietnamese" width=125 height=25 border=0></a></td></tr>
<tr><td width=NaN><a href="#search" onMouseOver="changeImages('image7',
'image7on')" onMouseOut="changeImages('image7', 'image7off')"><img
name="image7" src="srch2.jpg" alt="Search this site" width=125 height=25
border=0></a></td></tr>
</table>
</body>
</html>
Technical Details
Message-ID:
<378817d3.0@clarion.carno.net.au>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d6db,eef0ae0de5b9e46e,start X-Google-Attributes: gid10d6db,public From: "Geoff" <geoffrah@hotmail.com> Subject: On mouseover is showing Date: 1999/07/11 Message-ID: <378817d3.0@clarion.carno.net.au> X-Deja-AN: 499659565 X-NNTP-Posting-Host: 203.108.55.58 X-Trace: 11 Jul 1999 14:04:35 +1000, 203.108.55.58 Organization: Australian National University X-MSMail-Priority: Normal X-Priority: 3 Reply-To: "Geoff" <geoffrah@hotmail.com> Newsgroups: aus.computers.java X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211