I’m having a couple of issues with my form.
[B]1.[B]isn’t
[CODE]
function checkIllegalChars(theuser_name, error){
var name_exp = /[a-zA-Z]+/;
for(var i=0; i < theuser_name.length; i++)
{
the_char = theuser_name.charAt(i);
if (!name_exp.test(the_char))
{
error.val=2;
return false;
}
}
return true;
}
[B]2.
[CODE]
correct=checkSelOpts(sel_opt, error);
if (!correct)
{
error_mes += errors[error.val] + ‘<br>’;
}
…//[COLOR=”Blue”]else statement is further down…it’s not the problem[/COLOR]
…
function checkSelOpts(city_opts, error){
if (city_opts=”none”)
{
error.val=4;
return false;
}
return true;
}
Now I’ve checked Firebug and “city_opts” has the value of whatever is selected. So that part is working. But when I hit submit, the form isn’t recognizing that a city was indeed selected. It still shows an error message regardless of a city being selected or not. Please help.