Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mouse X and Y Within a div

Status
Not open for further replies.

scousethemoose

Programmer
Jul 14, 2002
69
AU
Hi pretty quick question, all I need to know is if it is possible to capture the x and y co-ordinates of the mouse from within a div.

I want to be able to be able to place objects at these co-ordinates.

Can someone point me in the right direction?
 
Hard way: Find the x and y relative to the screen, subtract the left and top of the div.

There is probably an easy way, though.

--Chessbot

"See the TURTLE of enormous girth!"
-- Stephen King, The Dark Tower series
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top