Hello,
How can I programmatically trigger textbox button click on enter key press?
My code is as follows, but doesn't seem to work
inputEvents: {
keypress: function(e) {
if (e.originalEvent.charCode == 13)
{
$(e.data.target).textbox("button").click();
}
var target = e.data.target;
var tmp = $('<span></span>');
tmp.html(String.fromCharCode(e.which));
var c = tmp.text();
tmp.remove();
if ('0123456789'.indexOf(c) >= 0) {
return true;
} else {
return false;
}
}
},