- Joined
- Mar 14, 2007
- Posts
- 396
- Reaction score
- 2
I've got a bit of javascript to to check a field in a form on my web page.
It's a competition so I need to make sure the visitor types it in correctly.
the javascript to check the 'answer' field is
but this is case sensitive.
I'd like to add some kind of other check for "Brabantia" too.
The javascript needs to return true whether the visitor enters 'brabantia' or 'Brabantia'
Any help?
Phil
It's a competition so I need to make sure the visitor types it in correctly.
the javascript to check the 'answer' field is
Code:
if (form.answer.value != "brabantia") {
alert( "oops! try again?" );
form.answer.focus();
return false ;
}
return true ;
}
but this is case sensitive.
I'd like to add some kind of other check for "Brabantia" too.
The javascript needs to return true whether the visitor enters 'brabantia' or 'Brabantia'
Any help?
Phil