Problem Statement
I am working on a module which have a array of textfields which are located next to each other,as soon as user types a single character the focus moves to other textfield and so on till we reach end of textfield array.Problem pops up when i need to delete any of the character or a group of characters by pressing the delete key on the soft keyboard,the data must also be erased accordingly
Problem
When i m trying to check the keyCode for delete or spacebar it gives me an empty value ,i am using Change Listener I don't knw where i am going wrong.
Any help would be appreciated.
Code:
textFields[i].addEventListener('change', function(e) {
Ti.API.info('in Event');
var j = e.source.id;
var k=e.type;
Ti.API.info('Value of k'+k);
Ti.API.info('Value of j'+j);
if(j != 24) {
textFields[j + 1].focus();
} else {
alert('Done');
}
});
↧