Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Dec 2002
    Location
    Orlando
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Dynamic Image Maps

    Hey all,
    Did some looking around and I couldn't seem to find any cut and dry info on creating/accessing image maps in JavaScript. Anybody have some simple DOM-compliant code they could share?

    Gracias!
    - Matt

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    UK
    Posts
    1,137
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i do believe they act in the same was as hyperlinks as you can link an image map to a page
    <area shape="circle" coords="245,30" href="#" OnClick="do()">

    a bit more about image maps
    http://javascriptkit.com/howto/imagemap.shtml

    scroots
    Spammers next time you spam me consider the implications:
    (1) that you will be persuaded by me(in a legitimate mannor)
    (2)It is worthless to you, when i have finished

  • #3
    New Coder
    Join Date
    Dec 2002
    Location
    Orlando
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks, scroots, but my question isn't about adding JavaScript actions to the areas themselves, but actually accessing and modifying the Map's properties from a JavaScript...say something like this:


    document.MyImageMap.area.coords = "34,24,23,24";


    Hope that makes more sense.

  • #4
    New Coder
    Join Date
    Dec 2002
    Location
    Orlando
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I also tried another approach with no success. I tried creating two seperate Image Maps with different names. Then I tried using JavaScript to switch the value of USEMAP on a given image. It comes up as "undefined"....anyone have some help?

    This would really be a lifesaver!

    - Matt


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •