🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: aus.computers.java
Article #1057

Re: On mouseover is showing

#1057
From: Andrew Whalan
Date: Wed, 11 Aug 1999 00:00
130 lines
4677 bytes
This is javaSCRIPT not java. If you can't tell which language it is look at
the <script language=...> tag, it will soon tell you.

Can I recommend asking again in comp.lang.javascript ?

Andrew Whalan

Geoff <geoffrah@hotmail.com> wrote in message
news:378817d3.0@clarion.carno.net.au...
> 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: <7oraoj$jkn$3@seagoon.newcastle.edu.au>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <378817d3.0@clarion.carno.net.au>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d6db,eef0ae0de5b9e46e
X-Google-Attributes: gid10d6db,public
From: "Andrew Whalan" <SkoZombie@Bigfoot.com>
Subject: Re: On mouseover is showing
Date: 1999/08/11
Message-ID: <7oraoj$jkn$3@seagoon.newcastle.edu.au>
X-Deja-AN: 511373643
References: <378817d3.0@clarion.carno.net.au>
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
Organization: The University of Newcastle
X-MSMail-Priority: Normal
Newsgroups: aus.computers.java