02-08-2012 10:41 AM
Is there any way to capture the delete key on the keyboard? I tried the following:
$("#textbox1").live('keydown', bind(this, onTextChanged));
$("#textbox2").live('keyup', bind(this, onTextChanged));
$("#textbox3").live('keypress', bind(this, onTextChanged));
onTextChanged = function(event){
alert ("bind keycode" + event.keyCode);
}
or
$('#textbox1').keydown(function(event){
alert("keydown keycode: "+event.keyCode);
});
$('#textbox2').keyup(function(event){
alert("keyup keycode: "+event.keyCode);
});
$('#textbox3').keypress(function(event){
alert("keypress keycode: "+event.keyCode);
});
I tested on the bb bold 9900. They works fine for the normal key, except for the del(backspace) key. Is there a special event handler for the del key? or I am doing something wrong?
Thanks in advance.