Show/Hide images on mouseover-mouseout.

Hi,

I am looking for an easy solution to have a layer with a big image show as long as the mouse is over a layer with a small image.
The code should work with all major browsers.

Anybody got a solution?

Thanks!

SumukhaAsked:
Who is Participating?
 
BogoJokerConnect With a Mentor Commented:
Move the onMouseOver from the <img> to the <a>.  Since the <a> encompasses the <img> they are essentially the same thing. =)

Joe P
0
 
jrramConnect With a Mentor Commented:
Just use the onmouseover, onmouseout events on the layer with the small image, with a display = 'block' or 'none' on the large layer.
0
 
SumukhaAuthor Commented:
Done that, but how do I suppress the big Layer/image before that?
I also guess that images have to be preloaded?

Thanks
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
SumukhaAuthor Commented:
Got that answer myself... Just hide the layer with the large image.

Anyway... when I move the mouse when it is over the small image/layer, the large one is flickering.
Is there a trick for that?

Thanks
0
 
SumukhaAuthor Commented:
It seems that the code that I am inserting via DW8 for this is not correct.

Dreamweaver complains about this code:

<p><a href="sample4/index.html"><img src="images/sampleGold100.jpg" width="100" height="80" border="1" onmouseover="MM_showHideLayers('box4','','show')" onmouseout="MM_showHideLayers('box4','','hide')" /></a></p>

and says
The onmouseover attribute of the IMG tag is not supported. [Netscape Navigator 6.0]

Anything else I can use?

Thanks
0
 
SumukhaAuthor Commented:
That made it. Thanks!
I just wonder why I am getting errors for Netscape 6, when using the  the 'Show events for Netscape 6' behavior option in DW...?

Thanks
Su
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.