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 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Feb 2003
    Location
    Thailand
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy i wanna code for show x:y on image ??

    umm..


    i want code


    onmouseover on image
    show X Y


    thx

  • #2
    Senior Coder joh6nn's Avatar
    Join Date
    Jun 2002
    Location
    72 W. 48' 57" , 41 N. 32' 04"
    Posts
    1,887
    Thanks
    0
    Thanked 1 Time in 1 Post
    what?
    bluemood | devedge | devmo | MS Dev Library | WebMonkey | the Guide

    i am a loser geek, crazy with an evil streak,
    yes i do believe there is a violent thing inside of me.

  • #3
    New to the CF scene
    Join Date
    Feb 2003
    Location
    Thailand
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lightbulb i no good at English

    i have image

    i want show x:y[width:height] mouse part on image

  • #4
    Regular Coder
    Join Date
    Sep 2002
    Location
    British Columbia
    Posts
    235
    Thanks
    0
    Thanked 0 Times in 0 Posts
    So when the mouse pointer is put over top of the image, the X and Y coordinates relative to the image will be displayed?

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    Zwolle, The Netherlands
    Posts
    1,120
    Thanks
    2
    Thanked 31 Times in 31 Posts
    this works in IE 5.5:

    Code:
    <html>
    <head>
    <title>Coordinates</title>
    <script type="text/javascript">
    function showcoords() {
      var x=0,y=0;
      x = event.offsetX;
      y = event.offsetY;
      window.status = "x = " + x + ", y = " + y;
      return (true)
    }
    </script>
    </head>
    
    <body>
    
    <img src="yourpic.jpg" onmousemove="showcoords()" />
    </body>
    </html>
    I am the luckiest man in the world

  • #6
    New to the CF scene
    Join Date
    Feb 2003
    Location
    Thailand
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thx for ALL

    Thank You


  •  

    Posting Permissions

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