Filtering by checkbox buttons.
Filtering by checkbox buttons.
Hi,
I have done a filter in my jsp page using a checkbox, when the first time the page load, it display all records (disabled=='F' and disabled=='T'),
I have a link in the jsp page :
Show only enabled.
when you check it, it show only enabled, when you uncheck it it shows only disabled.
doing that I noticed that I lost the first state (show all enabled and disabled).
I think I need 3 states (CHECKED, UNCHECKED,ALL)
Here is the js code :
[code]
$.fn.dataTableExt.afnFiltering.push(function(oSettings, aData, iDataIndex) {
checked = $('#checkbox').is(':checked');
whenever I try to post this question with javascript, I can't, there is error.
[/code]
Please your help is appreciated.
Thanks
I have done a filter in my jsp page using a checkbox, when the first time the page load, it display all records (disabled=='F' and disabled=='T'),
I have a link in the jsp page :
Show only enabled.
when you check it, it show only enabled, when you uncheck it it shows only disabled.
doing that I noticed that I lost the first state (show all enabled and disabled).
I think I need 3 states (CHECKED, UNCHECKED,ALL)
Here is the js code :
[code]
$.fn.dataTableExt.afnFiltering.push(function(oSettings, aData, iDataIndex) {
checked = $('#checkbox').is(':checked');
whenever I try to post this question with javascript, I can't, there is error.
[/code]
Please your help is appreciated.
Thanks
This discussion has been closed.
Replies
Allan