Hi Everyone,
I currently have a table with three drop down lists above it. As the user selects a value from each drop down to filter the results I'd like the table to hide the rows that do not fit ALL of the criteria selected so far. The closest I have gotten is this:
$("#ReportControls #InventoryReports select").change(function(){
$("#Report table tbody tr").hide();
var filterArray = new Array();
filterArray[0] = $("#ddlStyle :selected").text()
filterArray[1] = $("#ddlSize :selected").text()
filterArray[2] = $("#ddlColor :selected").text()
$.each(filterArray, function(i){
if (filterArray[i].toString() != "Style" && filterArray[i].toString() != "Size" && filterArray[i].toString() != "Color")
{
$("#Report table tbody tr").find("td:contains('" + filterArray[i].toString() + "')").parents("tr").show();
}
});
});
The only issue with it is that it pulls back all rows that contain a certain size or a certain color or a certain style instead of just rows that are a certain size AND a certain color AND a certain style. Thanks in advance for your help!
Jon