Click to See Complete Forum and Search --> : Check for changes on update form


florida
03-19-2003, 11:14 AM
I have an update form that works great but want something to check if any data changes were made to the form after hitting submit. Currently when I hit submit button I get my message "Data updated" but want something to check if no changes were made to the form and then give me message "No data changes made to update form". I read about "onchange" event but it doesnt seem to check if any data changes were made to the form.

Vladdy
03-19-2003, 11:16 AM
Server side. Compare the values you are overwriting with new ones.

florida
03-19-2003, 11:32 AM
Is there a function to do this comparison? How would I do this?

florida
03-19-2003, 11:39 AM
Is this in the right direction or can someone advise more?


<script language="javascript">

function check(){

if(document.theform.oldvalue.value==document.theform.newvalue.value)
{
alert("No changes made to form")

}
else
{
alert("Data updated")
}
}
</script>