Hi there,
I was wondering if anyone knew the syntax to write code for the following.
I want to have an alert box that pops up if the value in a input type contains a non alpha numeric character ie "%$#"
so i would do the following
function checkform()
{
if ("don't know what syntax to use in here"
{
alert("You must enter a value which only contains alphanumeric characters"
return false
}
else{
return true
}
}
<FORM name="form" method="post" action="" onSubmit="return checkform()">
<input type=text name=bleah>
<snip>
</form>
Thanks in Advance
I was wondering if anyone knew the syntax to write code for the following.
I want to have an alert box that pops up if the value in a input type contains a non alpha numeric character ie "%$#"
so i would do the following
function checkform()
{
if ("don't know what syntax to use in here"
alert("You must enter a value which only contains alphanumeric characters"
return false
}
else{
return true
}
}
<FORM name="form" method="post" action="" onSubmit="return checkform()">
<input type=text name=bleah>
<snip>
</form>
Thanks in Advance