Hi
I have the following validation in my form.
<SCRIPT LANGUAGE="JavaScript1.2">
<!-- Hide from other browsers
function validate(regForm)
{
if (regForm.Firstname.value =="")
{
window.alert("Please enter your Firstname");
return false;
}
}
and my form starts like this..
<form method=post action="submit.php" onsubmit="return validate(this)">
How would I ensure that the Firstname field in my form was not blank or didn't contain commas?
Any help appreciated
I have the following validation in my form.
<SCRIPT LANGUAGE="JavaScript1.2">
<!-- Hide from other browsers
function validate(regForm)
{
if (regForm.Firstname.value =="")
{
window.alert("Please enter your Firstname");
return false;
}
}
and my form starts like this..
<form method=post action="submit.php" onsubmit="return validate(this)">
How would I ensure that the Firstname field in my form was not blank or didn't contain commas?
Any help appreciated