mouse position..

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cyrak
    New Member
    • Mar 2008
    • 9

    mouse position..

    Hi
    I am doing some asp.net
    and I have this ImageMap with a bunch of hotspots on it...
    I am trying to figure out how to get the Mouse coordinates when the user clicks on the image...I am guessing the best way is to let javascript grab the location of the mouse..but how do you call a Javascript function from the onClick event of the hotspot? ...if I am thinking it wrong, please feel free to give point a different approach

    Thanks in advance
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    Well do you need it to be an html imagemap?
    If you just apply a javascript onlick function, you should be able to get the mouse position and then react accordingly?

    I think that there is a better way to do this while still using the ImageMap, but I cannot think of it. You might have to google javascript and imagemaps?

    Comment

    • cyrak
      New Member
      • Mar 2008
      • 9

      #3
      yeah it seemed like it was the wrong approach, thats why I was asking, but I ended up doing just that..onclick javascript function that saves on hidden fields and grabs them back onLoad..

      thanks for the help anyways :)

      Comment

      Working...