PDA

View Full Version : Filtre table using js



mitza.dragan
03-28-2019, 08:18 AM
Hi, I am a newcomer and I need some help with a js code.
I want to create a tabel filtre like https://www.w3schools.com/howto/howto_js_filter_table.asp .
The script works almost perfect.
Am on the first 3 columns the filtre work perfect, what I want more is that on the last 2 columns when you search for a dimension or code I want to display only the matched value, not all of product values.
To explain the table a bit:
Is an 5 columns table, where some of the first 3 columns have rowspan attribute because is same product but with different dimensions and codes.
If I search on dimension input the value "70" the script output all the products where is found the value 70 with all dimmensions, but i want to display only the value requested and hide other values that not meet the request ( on this case is showed 170, and 210 values, but i need to display only the 170 values.)
I put the link for the code here: https://jsfiddle.net/mitza_dragan/vg9e0fkr/3/

Thanks.

keyboard
03-28-2019, 01:07 PM
Hey mitza.dragan. Unfortunately your post got caught up in our spam filter and that's why it wasn't visible.
I've fixed that now and hopefully you can find an answer to your question.

fletch