aspose file tools
The moose likes HTML, CSS and JavaScript and the fly likes Browser coords in FF not working but working in IE Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "Browser coords in FF not working but working in IE" Watch "Browser coords in FF not working but working in IE" New topic
Author

Browser coords in FF not working but working in IE

K. Tsang
Ranch Hand

Joined: Sep 13, 2007
Posts: 1220

Hello I want to display the browser coordinates in both IE and FF but I only got it work in IE.

In IE I got the coords from e.clientX and e.clientY; however I expect FF to return e.pageX and e.pageY but it isn't. Hence I got 0 for the alerts. Anyone know why? Thanks


K. Tsang JavaRanch SCJP5 SCJD/OCM-JD
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56200
    
  13

pageX and pageY are not defined as part of the DOM Level 2 Standard.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15357
    
    6
You can not get the position of the cursor when they click the X in browser other than IE. I am not sure if you can do it in IE7.

Eric
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Browser coords in FF not working but working in IE
 
Similar Threads
posting coordinates into a tooltip?
Displaying a DIV wherever the mouse location is
Events in JSP are not supported in Mozilla
Pop up divs in FireFox
Popup Window Position