Click to See Complete Forum and Search --> : need help with mouseover prob


xdef
04-14-2003, 05:08 AM
Can someone please help me work out why this isn't
mouseovering.




<html>
<head>
<title>Image swap</title>
<script language="JavaScript" type="text/javascript">
<!-- hide
if(document.images){
___net0=new Image();
___net0.src="images/net0.gif";
___cell=new Image();
___cell.src="images/netcell.gif";
jack=new Image();
___jack.src="images/netjack.gif";
max=new Image();
___max.src="images/netmax.gif";
simm=new Image();
___simm.src="images/netsimm.gif";
}
else {
___net0="";
___netcell="";
netjackl="";
netmax="";
netsimm="";
___document.button="";
}
function myVoid() {;}
// end hide --> </script>
</head>
<body>

<img src="images/net0.gif" width="408" height="360" border="0" usemap="#thismap" name="button">
<map name="thismap"> <!--Image map-->
<area alt="netcel" coords="22,100,92,130" href="javascript:blank()"
onMouseover="document.button.src=cell.src" onMouseout="document.button.src=net0.src"></map>



</body>
</html>

Nevermore
04-14-2003, 05:14 AM
You can't use mouseovers in an image map. You will need to put the trigger in an anchor (<a>) tag.

xdef
04-14-2003, 06:12 AM
I don't really understand your reply. Are you saying you cant use a mouseover event in an image map....so the only event for this is onClick? That doesn't sound right so I guess that's not what your saying.

Could you please be more clear on this.

Nevermore
04-14-2003, 06:26 AM
You can't use onmouseover on a part of the image with image mapping. If you want to change part of the image, you will have to make the image out of many small ones. If you want to change te whole image, you need to put <a> tags around it and put the onmouseover in them.