View Single Post
  #1 (permalink)  
Old July 16th, 2005, 10:16 PM
IronStar IronStar is offline
Authorized User
 
Join Date: Feb 2005
Location: Smithtown, NY, USA.
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to IronStar
Default Preventing Data Loss when hitting back button

Hi,

I have a form where a user could have entered/updated some data. I can tell if any of the inputs have changed by creating a global boolean variable in the script tag and have the onChange() event handler set it to true if anything changes. If the user hits the back button or closes the browser by accident they will loose their updates. I can trap the event with onUnload and confirm that they are going to loose their updates. Can you stop the action of hitting the back button or closing the browser if the user does not want to loose their updates? Or can you temporarily disable the browser's back and close buttons while they are updating data?

Thanks,
Tom
Reply With Quote