How can i filter the "Make" values according to the year. For eg: When i select "Year" as "2012" the related data i.e; only "def" should be displayed in the drop down box. Another problem is the previous data in the table was shown again when i select next values. See the demo for better understanding.
I tried this.
$.each(g_Vehicle, function(index) {
var sMake = g_Vehicle[index].Make;
if($('#DropDown_Year').val())=='2011'){ /* for testing purpose i give year as 2011*/
if ($.inArray(sMake, g_MakesArray) == -1) {
g_MakesArray.push(sMake);
}
}
});
http://jsfiddle.net/NFXzn/4/[
^]