Thread View: aus.computers.java
1 messages
1 total messages
Started by Geoff
Sun, 11 Jul 1999 00:00
On mouseover is showing
Author: 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>
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads