auto tabbing not working on iphone
Posted
by
Sarita
on Pro Webmasters
See other posts from Pro Webmasters
or by Sarita
Published on 2012-09-24T08:31:15Z
Indexed on
2012/09/24
9:51 UTC
Read the original article
Hit count: 242
jQuery
I have problem with auto tabbing on Iphone or android. This auto tabbing code work perfectly on each browser of pc but not on mobile. please help me. its urgent.
$(document).ready(function() { WireAutoTab('<%= PartOne.ClientID %>', '<%= PartTwo.ClientID %>', 3); WireAutoTab('<%= PartTwo.ClientID %>', '<%= PartThree.ClientID %>', 2); });
function WireAutoTab(CurrentElementID, NextElementID, FieldLength) {
//Get a reference to the two elements in the tab sequence.
var CurrentElement = $('#' + CurrentElementID);
var NextElement = $('#' + NextElementID);
CurrentElement.keyup(function(e) {
//Retrieve which key was pressed.
var KeyID = (window.event) ? event.keyCode : e.keyCode;
//If the user has filled the textbox to the given length and
//the user just pressed a number or letter, then move the
//cursor to the next element in the tab sequence.
if (CurrentElement.val().length >= FieldLength
&& ((KeyID >= 48 && KeyID <= 90) ||
(KeyID >= 96 && KeyID <= 105)))
NextElement.focus();
});
}
© Pro Webmasters or respective owner