Detect unsaved changes before window closes

3 replies. Last post: February 15, 2010 11:46 PM by Andi Santoso
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback

Hi,

I am using WebDeskTopManager with couple of shortcuts. On click of each shortcut, window opens up with required URL. I am using onbeforeunload event to check unsaved changes on page. It works for just about everything but if i make some change on page and click 'X' button of window to close it, window closes first and then prompt comes up asking for "do you want to save?" but by that time window is already closed so its too late. Is there a way to stop window from closing and ask for save? I tried using OnBeforeWindowClosed event but i get object expected error. In documentation, its being called on pageloaded event. But when i do that, nothing happens and on pageLoad event it gets error.

Any suggestion will be welcome.

Thanks.

All times are GMT -5. The time now is 2:24 AM.
Previous Next