wood burning stoves*
The moose likes HTML, CSS and JavaScript and the fly likes Popup Window Position Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Popup Window Position" Watch "Popup Window Position" New topic

Popup Window Position

Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1394
I would like to have a window open at the cursor position. The following will work but does not place the window on the point I click. Also this will not work if the function is called from a hyperlink tag(javascript:"cursortest()")

Eric Pascarello

Joined: Nov 08, 2001
Posts: 15376
Why are you using moveTo? There is top/left


Also your code is not cross browser friendly. window.event is IE only.

I agree. Here's the link: http://aspose.com/file-tools
subject: Popup Window Position
Similar Threads
Is there something better then event.pageX/Y?
position a div under a label in any part of the page
Browser coords in FF not working but working in IE
position of HTML columns in pixels?
how to get and set the position of an element in Java Script