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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
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
Bartender

Joined: Sep 13, 2007
Posts: 1966
    
    7

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 OCPJP7
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60059
    
  65

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


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    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://aspose.com/file-tools
 
subject: Browser coords in FF not working but working in IE
 
Similar Threads
Pop up divs in FireFox
Displaying a DIV wherever the mouse location is
Events in JSP are not supported in Mozilla
posting coordinates into a tooltip?
Popup Window Position