Re: sigh...trouble with mouseover graphics...again..
by f u s i o n <brianj(at)ais.ais-gwd.com>
|
Date: |
Sun, 15 Feb 1998 16:54:39 -0500 |
To: |
<hwg-graphics(at)mail.hwg.org> |
In-Reply-To: |
bellsouth |
|
todo: View
Thread,
Original
|
|
cate stuart wrote:
>hi all,
>sorry if this is a retroubleshoot, but....
>mouseover graphic problem.
>i have a graphic up at this page
>
>http://www.newmusic.com/plan9/test
------------------
Hi Cate,
You have real problems with your code, but for now all you need to fix the
code would be to CORRECTLY name your images.
For image number 1 you have:
<A HREF="local.html"
onMouseOver = "imgOn('img1')"
onMouseOut = "imgOff('img1')">
<IMG SRC="local2.jpg"
WIDTH="83" HEIGHT="150"
BORDER = "0" NAME = "the talent!"></A>
This won't work. The image NAME attribute has a special purpose here.
Simply naming it "The Talent!" won't work.
This shouldn't be used to replace the alt attribute.
You must name your images according to the javascript functions.
Example:
if your first image reads:
onMouseOver = "imgOn('img1')"
onMouseOut = "imgOff('img1')"
(which it does)
Give your first image the NAME="img1" so that the codes correctly reads:
<A HREF="local.html"
onMouseOver = "imgOn('img1')"
onMouseOut = "imgOff('img1')">
<IMG SRC="local2.jpg"
WIDTH="83" HEIGHT="150"
BORDER = "0" NAME = "img1"></A>
This will allow the javascript to "know where to get the first image"
This is why you are getting errors that say:
"Images is not defined"
Be sure to name your images like I did above and you will be fine.
for example:
first rollover is NAME="img1"
second rollover is NAME="img2"
third rollover is NAME="img3"
and so on....
That should be all you need to make the script work.
Let me know if it fixed it.
Everyone who has ever tried rollovers, almost 100% of the time, makes that
error. I still forget to name my images :)
P.S. Look at the source of your page in netscape and you'll see the
blinking errors in blue. You might need to fix that.
regards,
b.j.
"Experience is a hard teacher
because she gives the test first,
the lesson afterward."
brian j. | fusion web design
freelance graphic designer/web developer
fusion(at)greenwood.net
<http://www.ais-gwd.com/~fusion>
[i.c.q. 1057986]
HWG: hwg-graphics mailing list archives,
maintained by Webmasters @ IWA