Default_flex Posted January 6, 2009 Share Posted January 6, 2009 I want to know what are the pageX and pageY equivalents for IE. pageX and pageY work on firefox, they are great because they get the actual position of the mouse relative to the page and not the window like clientX and clientY. any suggestions? thanks guys Link to comment Share on other sites More sharing options...
0 The_Decryptor Veteran Posted January 6, 2009 Veteran Share Posted January 6, 2009 QuirksMode has this script fragment if (e.pageX || e.pageY) { posx = e.pageX; posy = e.pageY; } else if (e.clientX || e.clientY) { posx = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft; posy = e.clientY + document.body.scrollTop + document.documentElement.scrollTop; } e is the event, posx and posy now contain the pageX and pageY values, if IE supported them. Link to comment Share on other sites More sharing options...
Question
Default_flex
I want to know what are the pageX and pageY equivalents for IE. pageX and pageY work on firefox, they are great because they get the actual position of the mouse relative to the page and not the window like clientX and clientY. any suggestions?
thanks guys
Link to comment
Share on other sites
1 answer to this question
Recommended Posts