fnFilter issue. Need help ASAP.
fnFilter issue. Need help ASAP.
janrusselcalachan
Posts: 10Questions: 0Answers: 0
Good day Allan,
I initialized my datatable like this
[code]
var janTable = $("#contentTable1").dataTable({
"bLengthChange": false,
"bAutoWidth": false,
"bJQueryUI": true,
"bFilter": false,
"aoColumns": [{ "bSortable": false },
{ "bSortable": false },
{ "bSortable": false },
{ "bSortable": false },
{ "bVisible": false },
{ "bVisible": false}] });
[/code]
What am i trying to do is that, whenever a person selects from a dropdownlist, the datatable "janTable", which is a list of schedule for the month of january, will be filtered based on the "Level Applying For"
The "Level Applying for" dropdownlist has 3 values, 1 for preschool, 2 for gradeschool and 3 for highschool
So I tried filtering the datatable by doing it like this:
[code]
$("#cboxLevelApp").change(function () {
var LevelID;
LevelID = $('#cboxLevelApp').val(); //This is working perfectly and when I alert the value of LevelID, it gets the correct value
janTable.fnFilter("^" + LevelID.toString() + "$", 5, true); //This is the part where I am having a problem.
[/code]
I tried to look at the error on the Firebug Developer Console and the problem says:
[quote]
e is null
line of error: jquery.dataTables.min.js
[/quote]
Thank you in advance. More power to you! DataTables rocks!
I initialized my datatable like this
[code]
var janTable = $("#contentTable1").dataTable({
"bLengthChange": false,
"bAutoWidth": false,
"bJQueryUI": true,
"bFilter": false,
"aoColumns": [{ "bSortable": false },
{ "bSortable": false },
{ "bSortable": false },
{ "bSortable": false },
{ "bVisible": false },
{ "bVisible": false}] });
[/code]
What am i trying to do is that, whenever a person selects from a dropdownlist, the datatable "janTable", which is a list of schedule for the month of january, will be filtered based on the "Level Applying For"
The "Level Applying for" dropdownlist has 3 values, 1 for preschool, 2 for gradeschool and 3 for highschool
So I tried filtering the datatable by doing it like this:
[code]
$("#cboxLevelApp").change(function () {
var LevelID;
LevelID = $('#cboxLevelApp').val(); //This is working perfectly and when I alert the value of LevelID, it gets the correct value
janTable.fnFilter("^" + LevelID.toString() + "$", 5, true); //This is the part where I am having a problem.
[/code]
I tried to look at the error on the Firebug Developer Console and the problem says:
[quote]
e is null
line of error: jquery.dataTables.min.js
[/quote]
Thank you in advance. More power to you! DataTables rocks!
This discussion has been closed.
Replies
Allan