Activate KeyTable with button

Activate KeyTable with button

tiitremmeltiitremmel Posts: 5Questions: 0Answers: 0
edited May 2011 in KeyTable
How to activate(focus - so that it could be navigate with keyboard) KeyTable with input button?
So far i'm here
[code]
$("#t").click(function(){
keys.fnSetPosition( 0, 0 );
});
[/code]
But i know that it can not work because if you click on #t the table looses focus.
Anybody ideas?

Replies

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin
    A little nasty but this should work:

    [code]
    $("#t").click(function(){
    setTimeout( function () { keys.fnSetPosition( 0, 0 ); }, 20 );
    });
    [/code]
    This might also work:

    [code]
    $("#t").click(function(){
    keys.fnSetPosition( 0, 0 );
    return false;
    });
    [/code]
    Allan
  • tiitremmeltiitremmel Posts: 5Questions: 0Answers: 0
    yes - it works, but only half way. if you press the button (#t), first cell focuses as it should, but keyboard navigation is not working. Any more ideas?
  • ana_purnamarianiana_purnamariani Posts: 2Questions: 0Answers: 0
    Hi, I'm new to datatables and keytables.. Currently I'm interested for this answer :)
    Tiitremmel.. have you find a solution for this issue? thanks
This discussion has been closed.