Here is my current code:
<html>
<head>
<title>Imagemap</title>
<script>
function swapImageIn(id){
document.getElementById(id).src='\\C:\Users\idb\Desktop\Websitefinal\usa.png';
}
function swapImageOut(id){
document.getElementById(id).src='\\C:\Users\idb\Desktop\Websitefinal\worldmap_load.png';
}
</script>
</head>
<body>
<div>
<img src="\\C:\Users\idb\Desktop\Websitefinal\worldmap_load.png" id="main" alt="" usemap="#worldmap_load" style="border-style:none" />
</div>
<div>
<map id="worldmap_load" name="worldmap_load">
<area shape="poly" alt="USA" coords="77,49,109,23,86,11,0,34,0,78" nohref="nohref" title="USA" onMouseOver="swapImageIn('main')" onmouseout="swapImageOut('main')" />
</map>
</div>
</body>
</html>
I am trying to get the mouseover event and mouseout event to work. They do not currently work. Any suggestions?
Edit-
When the area of a map is moused over I want an image to change. The event “onMouseOver” is never reached, however.
This works here. I reckon it’s the filepath that’s a problem. (Use forward slashes)