This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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: 2985
    
    9

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 OCPJP7 OCPWCD5 OCPBCD5 OCPWSD5 OCMJEA5 part 1 part 2/3
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 63208
    
  69

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: 15385
    
    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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Browser coords in FF not working but working in IE
 
It's not a secret anymore!