I use the following function to disable the submit button, so a user cannot click it twice:
function disable()
{
document.form1.submit.disabled = true;
document.form1.submit.value = "Edit Project";
}
And I call it this way:
<form method="post" name="form1" id="form1" onSubmit="javascript:disable()">
The function works, but if any changes are made to the fields on the form, the changes are not submitted to the database. When I run the page in Debug, I notice the value of the submit button is "Empty". "Edit Project" is what I titled the submit button on my form. The function used to say "Submit", instead of "Edit Project". Why is this making the value of the submit button empty? Thanks.
function disable()
{
document.form1.submit.disabled = true;
document.form1.submit.value = "Edit Project";
}
And I call it this way:
<form method="post" name="form1" id="form1" onSubmit="javascript:disable()">
The function works, but if any changes are made to the fields on the form, the changes are not submitted to the database. When I run the page in Debug, I notice the value of the submit button is "Empty". "Edit Project" is what I titled the submit button on my form. The function used to say "Submit", instead of "Edit Project". Why is this making the value of the submit button empty? Thanks.