CakePHP + JS/AJAX - performing actions on browser window close - is it possible?

2010-03-10 Thread Anna P
Hello! I have a question, is there a way to perform an action, when user tries to close browser window? For example: in an on-line store, when unregistered user places some order and doesn't proceed to payment system (its order is still not paid) and wants to leave website/close browser window.

Re: CakePHP + JS/AJAX - performing actions on browser window close - is it possible?

2010-03-10 Thread cricket
This isn't really a Cake question. You'd probably get a better response from a javascript list. I did something like that once. IIRC, you need to register a function to fire for body.onUnload because window.onClose is unreliable unless you used JS to open the window in the first place. Something