Click to See Complete Forum and Search --> : boundary handling


anupam kant
September 10th, 2004, 10:12 AM
can anyone help me, implementing the functionality to check if the values on a particular form has been changed; so that the user can be notified to save or descard the changes.

One possible solution could be: using a javascript array to fill all the values of each control on the form, after that when user wants to leave the page, again filling another array for all the controls on the form, and comparing these two arrays, if there is any change in two arrays, prompt the user that values on this form has been changed, and if he wants to save the changes?

This approach works fine for the simple html form, but in complex scenario like in case of ASP.NET where I need to post-back the form for multiple times, the approach fails because on each post back it refreshes the value in that first array.

my problem is to notify the user, if any of the control's value is changed.

Thanks in advance...