I would like to create loop to check data entered by user into TextField with all array values in global variable. I tried like this:
var i = 0;
for (i = 0; i < 3; i++) {
if (txtName.rawValue == _Name[i]) {
xfa.host.messageBox("Your NAME is correct.");
}
}
if (i == 3) {
xfa.host.messageBox("Your NAME is wrong.");
}
where:
_Name = eval(Names.value) is global variable array value
and
txtName is TextField where user type data.
When I run the execute that code I got the second message pop up first and then first message . How to fix the problem?
Thanks.