wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes How to Know Where Cursor is Positioned Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to Know Where Cursor is Positioned" Watch "How to Know Where Cursor is Positioned" New topic
Author

How to Know Where Cursor is Positioned

Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1466
    
    1
I have a page with two DIV tags on it(and upper section and lower section). I place a jsp in the lower section using jQuery load. When in the lower section I use the following code to keep up with the cursor so when mousedown is detected a third DIV tag is displayed at that point. This all works good except I tried to make the lower section DIV tag scrollable using overflow. Now my third DIV tag does not display at the cursor position it is offset usually lower. I figure it is the scrolling offset of the lower DIV tag but I have no idea how to compensate for this.


Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Are you putting the div inside of the layer that scrolls and not on the document level?

The div also has a scrollTop

Eric
 
Consider Paul's rocket mass heater.
 
subject: How to Know Where Cursor is Positioned