linking a mouseover and onclick event to an image map

W

WindAndWaves

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
 
M

McKirahan

WindAndWaves said:
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 + " 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
 
W

WindAndWaves

Considered Flash? If you have the budget, the time & inclination to
learn it - or some very generous kiwi buds ;) - these sorts of
applications are non-trivial uses of the technology. Sample:

http://www.newzealand.com/travel/destinations/new-zealand-map/interactiv
e_map_home.cfm


Yes, that map is AMAZING, probably slightly outside of my budget / time /
expertise unfortunately. My guestimate would be that it would costs at
least U$1000 to put together something like this. Would this be right?

Thank you for your response

- Nicolaas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,023
Latest member
websitedesig25

Latest Threads

Top