Here's a quickie.

I've got a few pages that allow someone to change the contents of their database. What I've done is written a little javascript function that checks to see if the user changes anything. If he or she HAS changed something and tries to exit the page without clicking "UPDATE", he or she is faced with a pop-up window saying: "You wanna register the changes?" or something like it.

Here's my question: does Javascript give control over the browser window's close button? As is, the script described above only kicks into action when the user clicks away from the current window. I'd like it to run even if the user tries to kill the window.

Man, for a quick question that was sure longwinded...!