I want to disable the form submit buttons before submitting the form. I am not sure where to enter the code.
After this statement
I want to process this statement
then I want the script to return true and submit.
How do I do this?
Quincy
Code:
<SCRIPT LANGUAGE="JavaScript">
<!--
function confirmSubmit()
{
if (document.form1.txtName.value.length < 1
|| document.form1.txtURL.value.length < 1)
{
alert("You must fill in both fields of the form.");
return false;
}
var confirmForm = confirm(
"Is this correct?\n" + document.form1.txtName.value +
"\n" + document.form1.txtURL.value);
if (confirmForm == true)
return true;
return false;
}
function confirmReset()
{
var resetForm = confirm("Are you sure you want to clear the form?");
if (resetForm == true)
return true;
return false;
}
// -->
</SCRIPT>
<form action="process_add_link.asp" method="post" name="form1" id="form1" onsubmit="return confirmSubmit();" onreset="return confirmReset();">
After this statement
Code:
if (confirmForm == true)
I want to process this statement
Code:
document.form1.Clear.disable = true;
document.form1.Submit.disable = true;
then I want the script to return true and submit.
How do I do this?
Quincy