try this one bro. :-)
html code here...
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script><div>
<select id="mysel">
<option value="2010">2010<option />
<option value="2009">2009<option />
<option value="2008">2008<option />
<option value="2007">2007<option />
</option></option></option></option></select>
<table id="mytable">
<tr>
<th>Year</th>
<th>Make</th>
<th>Model</th>
<th>SubModel</th>
</tr>
<tr>
<td><input type="text" id="year" value="year" /></td>
<td>
<td>
<table><tbody><tr><td>
</td></tr></tbody></table></td></td></tr>
</table>
</div>
jquery code here..
var data = [
{ Year: "2011", Make: "abc", Model: "100", SubModel: "5000", },
{ Year: "2011", Make: "abc", Model: "200", SubModel: "6000", },
{ Year: "2010", Make: "def", Model: "300", SubModel: "5000", },
{ Year: "2011", Make: "def", Model: "100", SubModel: "1000", }
];
$(function(){
$("#mysel").change(function(){
var len=0;
for(len = 0; len <data.length len="" mode="hold" /> if(data[len].Year==$(this).val()){
alert(">>"+data[len].Make+"<< >>"+data[len].Model+"<< >>"+data[len].SubModel);
$("#year").val(data[len].Year);
$("#make").val(data[len].Make);
$("#model").val(data[len].Model);
$("#submod").val(data[len].SubModel);
}
}
});
});
you can try it here.. :-)
http://jsbin.com/esosuw/1/