SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2006
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    getting clicked coordinates of image

    Anyone know how you can get the clicked (x,y) coordinates on an image in javascript?

  2. #2
    Non-Member
    Join Date
    Apr 2006
    Location
    Scotland
    Posts
    325
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Im not sure about javascript, but I saw something similar a while ago in the Yahoo DHTML download. You should have a look in there.

    Dont know if that helps or not...

  3. #3
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    mikexx2020, by one definition DHTML is X/HTML, CSS, and JavaScript being used together to make a web page change in response to user actions.

    Vyliss, check out Find position.
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  4. #4
    SitePoint Wizard stereofrog's Avatar
    Join Date
    Apr 2004
    Location
    germany
    Posts
    4,324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Vyliss View Post
    Anyone know how you can get the clicked (x,y) coordinates on an image in javascript?
    Internet Exporer has offsetX/Y properties of the Event object that contain mouse coords relative to the target, in mozilla there are (somewhat broken) layerX/Y.


Bookmarks

Posting Permissions

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