datatable search input tabindex is wrong

datatable search input tabindex is wrong

gdwolgastgdwolgast Posts: 4Questions: 0Answers: 0
edited June 2012 in DataTables 1.8
I have a jsp page that has 3 datatables. It also has several tabbable controls (input, anchors, etc) separate from the tables as well as anchors within the tables. I have tabindex on all the tabbable controls. When tabbing through the rendered document, the search inputs on the 3 tables are the last items tabbed. Is there a way to get the search boxes to be in tab order by giving them an explicit tabindex?

Replies

  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    Does http://datatables.net/ref#iTabIndex cover what you need?

    Allan
  • go2lightspeedgo2lightspeed Posts: 2Questions: 0Answers: 0
    edited June 2012
    I've done that and it worked for me.
  • gdwolgastgdwolgast Posts: 4Questions: 0Answers: 0
    My tables are created after the document is built so using that code won't work. Can you use iTabIndex when the table is created? In my case this would be after the document is already built. The table creation occurs on a button click event.
  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    > Can you use iTabIndex when the table is created?

    You can only use it when you call $(...).dataTable({ ... }); for the first time for a given table. If that isn't enough for you, then you can alter the attributes using standard jQuery calls with $(...).attr();

    Allan
  • gdwolgastgdwolgast Posts: 4Questions: 0Answers: 0
    That's a good idea. I'll give that a try.
This discussion has been closed.