| 
 Posted by jimmy on 04/03/07 04:06 
@Dan:- 
"HTML can't capture and react to any events; it's a markup language, 
not a programming language. " 
Exactly, i'm trying to capture the event in the javascript...i thought 
that was implicit... 
Problem is that whenver te user changes the data on the screen and 
leaves it without saving the data, I prompt user to save the data by 
calling a function on the body onunload event. 
 
And i'm not getting the exact coordinates...all i'm getting is the 
range i.e. 
**************************************************** 
if (event.clientY < 0 && event.clientX > 500) 
{ 
                 //don't ask the user to save the data 
} 
*************************************************** 
Here event.clientY < 0 ensures that the button wasn't clicked in the 
body and event.clientX >500 ensures that the function is not called 
when the refresh button is clicked, bcoz the page would unload in that 
event also. 
I know that event.clientX >500 won't work when the screen size or the 
browser's size is small...that is the problem  i m facing 
 
@Berg "Hmmm... so how do you check the coordinates of closing the 
window via 
Alt+F4 or some other method? " 
That is exacly my problem...how does one capture the window closing 
event... 
 
"I'm curious why you think you need to do this at all. " 
 I suppose the description above would serve the purpose !
 
[Back to original message] 
 |