I have a series of text hyperlinks which all have an associated image. Upon rolling over the text links I wish the associated image to appear. All images will appear in the same area.
Display a dummy image on the page. Then use the mouseover event of the hyperlink to dynamically change that image to any other image. Here's a sample:
<img name="I1" src="dummy.jpg">
<a href="anypage.html" onMouseOver="changeimage()" onMouseOut="restoreimage()">
in scripts:
function changeimage()
{
a=new Image();
a.src="newimage.jpg";
I1.src=a.src;
}
You can write the restoreimage() yourself.
You'll have to write a different changeimage() for each hyperlink or you can write one func and pass the name of the image file as argument.
Good luck,
Ciao.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.