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 if (form.answer.value != "brabantia") { alert( "oops! try again?" ); form.answer.focus(); return false ; } return true ; } Code (markup): 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
I've worked around the problem by adding a command in the form box to turn all uppercase to lowercase. This means the javascript check above only receives lowercase and it works fine. To strip the uppcase in the formfield I used <input name="answer" type="text" id="answer" maxlength="25" onChange="javascript:this.value=this.value.toLowerCase();"/> Code (markup):