Question
making sure my 3rd letter is one , or .
Hello,
I'm having big trouble trying to make sure user input one . (dot) or , (comma) in 3rd place on sentence, how can I do that?
I'm using this:
var letra:String = a_checar.charAt(2);
if ((letra != ",") || (letra != ".")) {
getURL("javascript:alert('erro no 3º digito')");
trace(letra);
return;
}
but this does not work, even if user enters per example 14,56, I got error on 3rd letter
Any help please?
Thanks
I'm having big trouble trying to make sure user input one . (dot) or , (comma) in 3rd place on sentence, how can I do that?
I'm using this:
var letra:String = a_checar.charAt(2);
if ((letra != ",") || (letra != ".")) {
getURL("javascript:alert('erro no 3º digito')");
trace(letra);
return;
}
but this does not work, even if user enters per example 14,56, I got error on 3rd letter
Any help please?
Thanks