I have a tricky text box problem.
I need to check the text box to see if the user input specific words. I know how to check the text box to see if it EQUALS a specific string but I’m not sure how to check if it CONTAINS a string.
I need to see if the checkbox
either contains the words:
“checking” or “savings”
and if it does, send the user to pageA.htm
or if it contains the phrases:
“account number” or “bank number” or “transit number”
and if it does, send the user to pageB.htm
function checkform(){
if (form.userResponse.value ????){
window.document.location = “pageA.htm”}
else if (form.userResponse.value ????){
window.document.location = “pageB.htm”;}
else
alert(‘Try again.’);
}