i have 2 tables, first is main category will display in dropdownlist, and second is subcategory chexboxes.
i have a problem in this. need to display subcategory while selecting any maincategory from dropdownlist id to display subcategory.
category table:
state:<select name"category" id="category">
<option value="0">...select state...</option>
<option value="karnataka">karnataka</option>
<option value="Tamilnadu">Tamilnadu</option>
<option value="kerala">kerala</option>
</select>
subcategory table:
inside karnataka i have data's like
bangalore
mysore
tumkur
mangalore etc
inside Tamilnadu
chennai
coimbatore
madurai
salem etc
inside kerala
kochin
pallkad etc
these values i added in diff table by using first table id.
if i select state as karnataka then that related cities are display in checkbox. i know this will done by using ajax.but i have no idea about ajax. so please post some sample coding for this or any suggestion