Hello,
I am trying to filter an HTML table by div value using javascript.
Here is my table in HTML:
I would like to know how to only list rows in my table that have a greater div value than 185.
Therefore, when executing the javascript, I would expect that only row 1 and 3 would show, but row 2 would not because its div value is 183.2.
If possible, I would like the user to select from a drop down list values for which greater div values would show.
For example, there could be options for 184, 185, 186, etc. and if they select 185 it will show all rows in which div values are greater than or equal to 185. The same with 186, etc.
If you could provide any insight I would be very appreciative. Thanks!
I am trying to filter an HTML table by div value using javascript.
Here is my table in HTML:
Code:
<table> <tr> <td><div align="center">1</div></td> <td><div align="left" value="198.1000"><a href="frontend.php">Shields</a></div></td> <td><div align="left">111.0000</div></td> </tr> <tr> <td><div align="center">2</div></td> <td><div align="left" value="183.2000"><a href="frontend.php">Millwood</a></div></td> <td><div align="left">108.0000</div></td> </tr> <tr> <td><div align="center">3</div></td> <td><div align="left" value="189.1000"><a href="frontend.php">Lopez</a></div></td> <td><div align="left">106.0000</div></td> </tr> </table>
Therefore, when executing the javascript, I would expect that only row 1 and 3 would show, but row 2 would not because its div value is 183.2.
If possible, I would like the user to select from a drop down list values for which greater div values would show.
For example, there could be options for 184, 185, 186, etc. and if they select 185 it will show all rows in which div values are greater than or equal to 185. The same with 186, etc.
If you could provide any insight I would be very appreciative. Thanks!

Comment