keys.block = false not working
keys.block = false not working
chemjournal
Posts: 1Questions: 0Answers: 0
Hello,
I'm having a problem with keys.block = false not working. I'm using a keytable with input elements within an html table. I'm not using keytable with jeditable because that would require a lot of modification to my current application. The following is the code that I'm using:
[code]
var keys = new KeyTable( {
"table": document.getElementById('timesheetTable')
} );
keys.event.action(null,null, function(nCell){
keys.block = true;
//var node = $(keys.fnGetCurrentTD()).children()[0];
var temp = $(nCell).children()[0];
$(temp).focus();
$(temp).keydown(function(event){
if(event.keyCode == 13){
//var node = $(keys.fnGetCurrentTD()).children()[0];
//$(node).focus();
keys.block = false;
}
});
});
[/code]
What I basically want to do is to unblock the keytable keys so that when the user presses enter on the input and then uses the arrow keys the keytable takes effect. I tried debugging in chrome and for some reason it just does not unblock the keytable.
Any help would be greatly appreciated.
I'm having a problem with keys.block = false not working. I'm using a keytable with input elements within an html table. I'm not using keytable with jeditable because that would require a lot of modification to my current application. The following is the code that I'm using:
[code]
var keys = new KeyTable( {
"table": document.getElementById('timesheetTable')
} );
keys.event.action(null,null, function(nCell){
keys.block = true;
//var node = $(keys.fnGetCurrentTD()).children()[0];
var temp = $(nCell).children()[0];
$(temp).focus();
$(temp).keydown(function(event){
if(event.keyCode == 13){
//var node = $(keys.fnGetCurrentTD()).children()[0];
//$(node).focus();
keys.block = false;
}
});
});
[/code]
What I basically want to do is to unblock the keytable keys so that when the user presses enter on the input and then uses the arrow keys the keytable takes effect. I tried debugging in chrome and for some reason it just does not unblock the keytable.
Any help would be greatly appreciated.
This discussion has been closed.