Forum Moderators: open
I have a problem with this script. I've searched all over for the correct syntax to fit this type of script with no success. I can't see what's up with it. Can you help?
It's to do with syntax, not the map tags or any other thing that obvious. I've been swapping tags around and this is whjere I've had enough of it.
The script:
<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>
<a href="javascript:myVoid" onMouseover="document.button.src=cell.src" onMouseout="document.button.src=net0.src">
<img src="images/net0.gif" width="408" height="360" border="0" usemap="#thismap"
name="button"></a>
<map name="thismap"><area alt="netcel" coords="22,100,92,130">
</map>
<area alt="netcel" coords="320,187,400,211" href="javascript:blank()"
onMouseover="document.button.src=cell.src" onMouseout="document.button.src=net0.src">
<area alt="netcel" coords="48,276,124,303" href="javascript:blank()"
onMouseover="document.button.src=cell.src" onMouseout="document.button.src=net0.src">
<area alt="netcel" coords="256,282,334,310" href="javascript:blank()"
onMouseover="document.button.src=cell.src" onMouseout="document.button.src=net0.src">
</map>
</body>
</html>
The mouseover simply isnt working. Though it did click it would not mouseover.
In short, nothing happens when I mouseover. (But strange that it will click to the swap image).
Im using IE5.1 and a Mac. But I can mouseover elsewhere so i assume it isnt the browser. I'll make the changes suggested to see if there is any fix in this, and post a reply