linking a mouseover and onclick event to an image map

Discussion in 'Javascript' started by WindAndWaves, Dec 10, 2004.

  1. WindAndWaves

    WindAndWaves Guest

    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
    WindAndWaves, Dec 10, 2004
    #1
    1. Advertising

  2. WindAndWaves

    McKirahan Guest

    "WindAndWaves" <> wrote in message
    news:ktdud.24141$...
    > 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
    McKirahan, Dec 10, 2004
    #2
    1. Advertising

  3. WindAndWaves

    WindAndWaves Guest

    "Rob B" <> wrote in message
    news:1102712650.497a05d0a59ef455bd4589674f76f0a0@teranews...

    > 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
    WindAndWaves, Dec 10, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. JerryG
    Replies:
    0
    Views:
    423
    JerryG
    Dec 20, 2005
  2. RKT
    Replies:
    3
    Views:
    943
    Karl Seguin
    Dec 24, 2005
  3. DataSmash
    Replies:
    2
    Views:
    552
    DataSmash
    May 30, 2006
  4. Tony Farrell

    mouseover, mouseout and onclick in a <TD>

    Tony Farrell, Feb 26, 2004, in forum: Javascript
    Replies:
    1
    Views:
    119
    Michael Winter
    Feb 27, 2004
  5. murrayatuptowngallery

    mouseover image and object sound and preset volume level?

    murrayatuptowngallery, Nov 1, 2005, in forum: Javascript
    Replies:
    4
    Views:
    194
    Thomas 'PointedEars' Lahn
    Nov 1, 2005
Loading...

Share This Page