Stickybomb Posted February 20, 2007 Share Posted February 20, 2007 lets say that when i put my mouse over an imagemap that a layer becomes visible at or in relation to the mouses position. how do you get the mouses position? Quote Link to comment Share on other sites More sharing options...
weknowtheworld Posted February 20, 2007 Share Posted February 20, 2007 Try this : <html> <head> <script language="JavaScript"><!-- if (document.layers) document.captureEvents(Event.MOUSEMOVE); document.onmousemove=mtrack; function mtrack(e) { var Text= 'Coordinates: '; if (document.layers) Text += e.pageX+','+e.pageY else Text += event.x+','+event.y; window.status= Text; } //--></script> </head> <body> Move the mouse and see the status change </body> </html> Quote Link to comment Share on other sites More sharing options...
Stickybomb Posted February 20, 2007 Author Share Posted February 20, 2007 nice;) thxs this will sure help Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.