You need to sign in to do that
Don't have an account?

how to autotab to a next field once the max length reached in Javascript
Hi
I have 4 textboxes like credit card number boxes. They all have different max lengths.
I have coded the below in the controller component but it is not working. Can you please suggest what I am doing wrong?
if (cmp.Find("offerCodePart1").length == cmp.Find("offerCodePart1").maxLength){
cmp.Find("offerCodePart2").focus();
}
Regards
Amar
I have 4 textboxes like credit card number boxes. They all have different max lengths.
I have coded the below in the controller component but it is not working. Can you please suggest what I am doing wrong?
if (cmp.Find("offerCodePart1").length == cmp.Find("offerCodePart1").maxLength){
cmp.Find("offerCodePart2").focus();
}
Regards
Amar
Could you share some detail code snippet so that we can replicate the thing on our end.
Thanks!