Click to See Complete Forum and Search --> : how to find the position of coordinate on clicked position ?


PHPycho
05-21-2007, 07:21 AM
hello forums!!
I am wondering to know -
how to find the position of coordinate on clicked position ? using javascript.

Case:
Suppose i had a image ,when mouse is clicked @ certain position of image, then it should alert the x & y coordinate of that point..

Awaiting for your great help..
Thanks in advance to all of you

JPnyc
05-21-2007, 10:09 AM
Easiest way is to have a function that returns mouse position and call it onclick. You'll find a very simple script to do so, here:

http://www.w3schools.com/js/tryit.asp?filename=try_dom_event_clientxy