The javascript:
<script language="JavaScript">
<!-- Hide
function validate( form ) {
if ( form.email.value == "" || form.email.value.indexOf('@',0) == -1)
{ alert("Invalid e-mail address!"
return false;
}
else return true;
}
--></script>
The Handler:
onSubmit="return validate(MyForm3)"
Works fine but here is my problem. It only seems to work on one form, on my pages I have two forms as you saw. Made two seperate functions for each one, called from an external .js file. One worked one did not. They were exactly the same minus the different form names and field names pertaining to the function for that particular form. Can you only validate one form on a page?
Also the onSubmit handler is not xhtml compliant.
Any thoughts on the work around guys? I would really like to have these two sign ups on my pages, shows some interactivity if nothing else. Plus I want to highlight my email marketing program by having potential customers sign up and receive mail from me to show them how its done.
I searched google for the fix, but to no good.
csatterwhite@orlandomediasolutions.com
<script language="JavaScript">
<!-- Hide
function validate( form ) {
if ( form.email.value == "" || form.email.value.indexOf('@',0) == -1)
{ alert("Invalid e-mail address!"
return false;
}
else return true;
}
--></script>
The Handler:
onSubmit="return validate(MyForm3)"
Works fine but here is my problem. It only seems to work on one form, on my pages I have two forms as you saw. Made two seperate functions for each one, called from an external .js file. One worked one did not. They were exactly the same minus the different form names and field names pertaining to the function for that particular form. Can you only validate one form on a page?
Also the onSubmit handler is not xhtml compliant.
Any thoughts on the work around guys? I would really like to have these two sign ups on my pages, shows some interactivity if nothing else. Plus I want to highlight my email marketing program by having potential customers sign up and receive mail from me to show them how its done.
I searched google for the fix, but to no good.
csatterwhite@orlandomediasolutions.com