I have a really large table (around 32 columns and 1000+ rows) which I’m trying to filter using a drop down box.
The table takes a relatively standard format (this one has been redacted for simplicity):
<div id="SearchResults">
<table>
<thead>
<tr>
<th>Report Name</th>
<th>xxxxx Name</th>
</tr>
</thead>
<tbody>
<tr>
<td>Sales_Report_Week_#</td>
<td>Sales Volume</td>
</tr>
</tbody>
</table>
The drop down box has already been assembled like so:
<select name="Report_Name_Drop" id="id_dropdown">
<option>xxxxx1</option>
<option>xxxxx2</option>
<option>xxxxx3</option>
<option>xxxxx4</option>
<option>xxxxx5</option> </select>
Unfortunately I’m working within a severely locked down sharepoint environement meaning I am unable to use any plug ins. I simply need to hide all rows which do not match the value in the drop down box but I can’t for love nor money figure out how!
Any help would be greatly appreciated!
Thanks,
James
Try something like this. Basically I create a set of the values in the filter column, and add those values to the
<select>dropdown. Then when that dropdown changes I hide/show the relevant rows in the table. This pattern can be extended to include multiple filters as needed, just test all the relevant columns against all the relevent<select>elements.