redho home | products | services
Web Design Forums

Web Design Forums  


Web Hosting, Web Design, Software and Web Development Forums  
 FAQFAQ   MemberlistArchive  Log inLog in   RegisterRegister 
         

how to capture the mouse leaving the browser window



 
Post new topic   Reply to topic    Web Design Forums -> JavaScript forum
View previous topic :: View next topic  
Author Message
Mupolan



Joined: 30 May 2006
Posts: 101
Hello all ... any idea how to reliably capture the mouse leaving the browser window so I can cancel my drag and drop?
  Reply with quote


autos06



Joined: 13 May 2006
Posts: 123
Location: New York
Look how scriptaculous solved it.
  Reply with quote
Mupolan



Joined: 30 May 2006
Posts: 101
autos06, looks like they didn't solve it, on their site I drag an object, move the mouse out of the window, release the mouse button, and then move the mouse back into the window and I'm still dragging with no mouse buttons down
  Reply with quote
autos06



Joined: 13 May 2006
Posts: 123
Location: New York
Okey Sad
  Reply with quote
ovigo22



Joined: 15 May 2006
Posts: 130
Google, baby. it's all about google.
  Reply with quote
autos06



Joined: 13 May 2006
Posts: 123
Location: New York
I dont know if the cursor position will move each pixel at a time, or jump several pixels at a time, but maybe looking constantly to see if pixelposition == windowwidth-1 ?
Or look through specs. see if anything triggers specificaly when moving out of a window (maybe propretary, both IE and firefox have loads)
I ment, "maybe look if cursor position == windowwidth-1 (then the same for top, left and bottom)
  Reply with quote
Mupolan



Joined: 30 May 2006
Posts: 101
Looks like there is an ie onmouseleave but I can't find an ff equivalent
Yes, that might work
  Reply with quote
autos06



Joined: 13 May 2006
Posts: 123
Location: New York
Solution: (fond with 5 sec on google)
Http://www.faqts.com/knowledge_base/view.phtml/aid/1606
Found it through this page actually (this was google 5sec) http://www.experts-exchange.com/Web/Web_Languages/JavaScript/Q_21681990.html
  Reply with quote
Mupolan



Joined: 30 May 2006
Posts: 101
Thanks, will read it
You could work around it with onkeypress
  Reply with quote
Page 1 of 1
Post new topic   Reply to topic    Web Design Forums -> JavaScript forum


Dubai Forums - Expat Help | Vegan Chat | Java Programming | Free 3D tutorials and 3d textures | Paris Forum | EU Forum
Free Dubai Classifieds | Free London Classifieds | Jobs in London

High Quality, Custom 3d animation and Web Design solutions Royal Quality Web Hosting Services Vegetarian and Animal Rights news

Powered by phpBB © 2001, 2005 phpBB Group