T
Travis
I am trying to make sure that a user enters either a yes or no in a text box
so I tried this statement
if (answer1 = = "" | | answer1 != "yes" | | answer1 !=
"no")
{
give error message for answer 1
}
else if (answer2 = = "" | | answer2 != "yes" | | answer2 !=
"no")
{
give error message for answer 2
}
else
{
do my stuff
}
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!
Travis
(e-mail address removed)
so I tried this statement
if (answer1 = = "" | | answer1 != "yes" | | answer1 !=
"no")
{
give error message for answer 1
}
else if (answer2 = = "" | | answer2 != "yes" | | answer2 !=
"no")
{
give error message for answer 2
}
else
{
do my stuff
}
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!
Travis
(e-mail address removed)