Posts: 40
Name: Bob Davis
Location: Los Angeles, CA
|
Hi - I have a form on my site that is submitted the usual way, with a button in the form. It works fine and verifies that the email in the form is properly filled out. Like this:
<form action="EmailAction.cfm" method="post" name="SupportForm" onSubmit="return CheckSupportForm(this)">
<input class="forms1" type="text" name="Email" size="25" tabindex="1">
<input type="image" name="SubmitFormBut" src="img/Submit.gif" alt="" tabindex="34" align="absmiddle" border="0" height="22" width="91">
</form>
But I need to replace the button with a javascript button (so that people that have javascript turned off cannot submit the form). But when I do it this way, although the button will submit just fine, it does not verify the email format. Does anyone have an answer to why it does not verify?
<form action="EmailAction.cfm" method="post" name="SupportForm" onSubmit="return CheckSupportForm(this)">
<input class="forms1" type="text" name="Email" size="25" tabindex="1">
<img src="img/Submit.gif" width="91" height="22" border="0" name="SubmitFormBut">
</form>
<SCRIPT language="JavaScript1.2">
function submitform()
{
document.SupportForm.submit();
}
</SCRIPT>
|