"WindAndWaves" <ac****@ngaru.com> wrote in message
news:kt*******************@news.xtra.co.nz...
Hi Folk
I have an image map (map of New Zealand with various areas defined using
an image map). Now I am wondering if it is possible to link this "image map"
to an onclick and onmouseover event.
Any ideas?
- TIA
Nicolaas
Try this; watch for word-wrap.
<html>
<head>
<title>NZ.htm</title>
<script type="text/javascript">
function nz(i,j) {
var one = new Array("onmouseover","onmouseout","onclick");
var two = new Array("North Island","South Island");
window.status = one[i] + " of " + two[j];
}
</script>
</head>
<body bgcolor="#000000">
<img src="http://www.travelplanner.co.nz/driving/images/nz2.gif" border="0"
alt="" usemap="#NZ">
<map name="NZ">
<area shape="circle" coords="318,83,83" onmouseover="nz(0,0)"
onmouseout="nz(1,0)" onclick="nz(2,0)">
<area shape="circle" coords="252,247,92" onmouseover="nz(0,1)"
onmouseout="nz(1,1)" onclick="nz(2,1)">
</map>
</body>
</html>
Credit for source of NZ map:
New Zealand travel map & driving distance calculator
http://discovernz.co.nz/driving/smlcalc.html http://www.travelplanner.co.nz/driving/smlcalc.html http://www.travelplanner.co.nz/driving/images/nz2.gif