Click here to Skip to main content
15,896,606 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi
how to get the page coordinate when click on a button in gridview?

i want to find out where an element(button) is on the page.that is, finds the real position, so if resize the page it points to the correct new position of the element.




Thanks..
Posted
Updated 24-May-13 2:54am
v2

1 solution

Use below mentioned code inside your click event handler in JavaScript

window.event.clientY
window.event.clientX
 
Share this answer
 
v3
Comments
hasbina 24-May-13 8:56am    
hmm.getting error.Microsoft JScript runtime error: 'window.event.clientY' is null or not an object

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900