How to filter html table?
Hi I am trying to incorporate Table filtering , where the user can select a author or nam开发者_如何学Goe and filter the table based on then name . The feed has to be Based on xml feed .
Is there any example that I can use?
I was was looking at this example http://dev.sencha.com/deploy/ext-4.0.2/examples/grid/xml-grid.html
or something http://www.picnet.com.au/resources/tablefilter/demo.htm
How can I add a combo box(dropdown box) outside the table to filter based on various authors selection name the feed i would like to use is xml
Or any other example similar to this
Thanks
You'd be best off using a JavaScript library such as jQuery, which enables you to use the myriad plugins that are available.
jqGrid does all of that kind of stuff for you.
Have a look at the examples here under Live Data Manipulation > Searching Data. You should be able to just replace the input
with a select
.
Alternatively, still with jQuery but this question might do what you need: Filter table from <select> input using jQuery
The answer is in your question. Filters are generated by jQuery plugin. Here's step by step manual.
Use standard DOM (DomDocument class). Example: this testkit loads any HTML DTD, and you can do any filter with a good and standard XSLT transform.
精彩评论