jimktrains
IS-IT--Management
I have a page where a user selects an item and then the page is populated from a database. I set a javascript variable "changed" to false and each field has an onchange event that sets "changed" to true so when the user leaves the page without saving, they will be notified.
But I noticed that after the database populates the fields, the value of "changed" is true, because the values of the field chnaged from blank to a value. I even tried to set "changed" to false using ScriptManager.RegisterClientScriptBlock after all the data loaded but that didn't work.
Using C# in the codebehind, or just using javascript, how can I set changed to false after the data loads?
But I noticed that after the database populates the fields, the value of "changed" is true, because the values of the field chnaged from blank to a value. I even tried to set "changed" to false using ScriptManager.RegisterClientScriptBlock after all the data loaded but that didn't work.
Using C# in the codebehind, or just using javascript, how can I set changed to false after the data loads?