posted 16 years ago
The detect cursor position X hack only works in one browser and it does not account for alt f4, ctrl-w, and file-quit to name a few.
Also, there are better ways of adding script to the page that using events on script tags.
The best way to code for unbeforeunload is to not show it based on events that you want to happen. You set a flag submission on links, the form submit, and so on.
Eric