G
Guest
I am trying to make sure that a user enters either a yes or no in a text box so I tried this statemen
if (answer1 = = "" | | answer1 != "yes" | | answer1 != "no"
give error message for answer
else if (answer2 = = "" | | answer2 != "yes" | | answer2 != "no"
give error message for answer
els
do my stuf
But the OR statements will not process if the user enters no or yes. It just sees that the answer is not blank and ignores the rest. How do I make it check to make sure that not only is it not BLANK but that either YES or NO was answered and nothing else
Help
Travi
(e-mail address removed)
if (answer1 = = "" | | answer1 != "yes" | | answer1 != "no"
give error message for answer
else if (answer2 = = "" | | answer2 != "yes" | | answer2 != "no"
give error message for answer
els
do my stuf
But the OR statements will not process if the user enters no or yes. It just sees that the answer is not blank and ignores the rest. How do I make it check to make sure that not only is it not BLANK but that either YES or NO was answered and nothing else
Help
Travi
(e-mail address removed)