JohannIcon
Programmer
Hi All,
I have an error in my validation page however I cannot understand why cause I think I am doing everything right. My error is onSubmit, and the funny thing is that I am using the same code as another ASP page and the other ASP is working!
The error the browser is giving me is Object Expected and pointing the the onSubmit action!
Here is my code:-
<form name="SendForm" method="post" action="ContactForm.asp" onSubmit="return checksubmit()">
<table width="320" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="68" height="25" class="textgrey">Name:</td>
<td width="270" class="textgrey">
<input name="firstName" type="text" id="firstName" size="35" class="textgrey">
</td>
</tr>
<tr>
<td class="textgrey">Surname:</td>
<td> <input name="Surname" type="text" id="surname" size="35" class="textgrey">
</td>
</tr>
<tr>
<td class="textgrey">E-Mail:</td>
<td> <input name="Email" type="text" id="eMail" size="35" class="textgrey" onChange="return validate_email(SendForm.Email)">
</td>
</tr>
<tr>
<td class="textgrey">Message:</td>
<td><textarea name="Message" cols="35" rows="6" class="textgrey" id="message"></textarea></td>
</tr>
</table>
<p align="right"> </p>
<input type="hidden" name="hiddenField" value="Query from Client">
<center>
<input name="submit" type="submit" class="menu" value="Send">
</center>
</form>
<script>
function checksubmit() {
if (SendForm.firstName.value == ""
{
alert("You must Enter Your Name"
SendForm.firstName.focus()
SendForm.firstName.select()
return false
}
.
.
.
.
.
. return true
}
Can you tell me if you find anything weird?
I have an error in my validation page however I cannot understand why cause I think I am doing everything right. My error is onSubmit, and the funny thing is that I am using the same code as another ASP page and the other ASP is working!
The error the browser is giving me is Object Expected and pointing the the onSubmit action!
Here is my code:-
<form name="SendForm" method="post" action="ContactForm.asp" onSubmit="return checksubmit()">
<table width="320" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="68" height="25" class="textgrey">Name:</td>
<td width="270" class="textgrey">
<input name="firstName" type="text" id="firstName" size="35" class="textgrey">
</td>
</tr>
<tr>
<td class="textgrey">Surname:</td>
<td> <input name="Surname" type="text" id="surname" size="35" class="textgrey">
</td>
</tr>
<tr>
<td class="textgrey">E-Mail:</td>
<td> <input name="Email" type="text" id="eMail" size="35" class="textgrey" onChange="return validate_email(SendForm.Email)">
</td>
</tr>
<tr>
<td class="textgrey">Message:</td>
<td><textarea name="Message" cols="35" rows="6" class="textgrey" id="message"></textarea></td>
</tr>
</table>
<p align="right"> </p>
<input type="hidden" name="hiddenField" value="Query from Client">
<center>
<input name="submit" type="submit" class="menu" value="Send">
</center>
</form>
<script>
function checksubmit() {
if (SendForm.firstName.value == ""
{
alert("You must Enter Your Name"
SendForm.firstName.focus()
SendForm.firstName.select()
return false
}
.
.
.
.
.
. return true
}
Can you tell me if you find anything weird?