Focus on the Search input
Focus on the Search input
CharlyPoppins
Posts: 16Questions: 2Answers: 0
Hi, I try to set the focus on the Search input of the dataTable when the page is load, but I didn't manage.
Is there a way to so this ?
Is there a way to so this ?
This discussion has been closed.
Replies
Allan
Now i figured out the problem.
It work if :
"oLanguage": {
"sUrl": "../js/dataTables/fr_FR.txt"
},
is in comment. When I uncomment it, the focus don't work anymore.
oTable = $('#liste').dataTable({
"sDom": '<"top"iflp<"clear">>rt<"bottom"iflp<"clear">>',
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "server_processing.php",
"iDisplayLength": 50,
//"oLanguage": {
// "sUrl": "../js/dataTables/fr_FR.txt"
//},
"aoColumnDefs": [
{ "bSortable": false, "bSearchable": false, "bVisible": true, "aTargets": [ 0 ] }
],
"bStateSave": true,
});
$('#liste_filter input').focus();