Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > linking a mouseover and onclick event to an image map

Reply
Thread Tools

linking a mouseover and onclick event to an image map

 
 
WindAndWaves
Guest
Posts: n/a
 
      12-10-2004
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


 
Reply With Quote
 
 
 
 
McKirahan
Guest
Posts: n/a
 
      12-10-2004
"WindAndWaves" <(E-Mail Removed)> wrote in message
news:ktdud.24141$(E-Mail Removed)...
> 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


 
Reply With Quote
 
 
 
 
WindAndWaves
Guest
Posts: n/a
 
      12-10-2004

"Rob B" <(E-Mail Removed)> wrote in message
news:1102712650.497a05d0a59ef455bd4589674f76f0a0@t eranews...

> 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/des...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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Linking onClick event to other controls on the Frame DataSmash Python 2 05-30-2006 02:12 PM
HtmlImage and asp:Image servent onclick event RKT ASP .Net 3 12-24-2005 10:06 PM
how to handle both onmouseup event and onClick event JerryG ASP .Net 0 12-20-2005 03:49 AM
mouseover image and object sound and preset volume level? murrayatuptowngallery Javascript 4 11-01-2005 10:39 AM
mouseover, mouseout and onclick in a <TD> Tony Farrell Javascript 1 02-27-2004 12:17 AM



Advertisments