i am working on a module where i have main categories in sidebar in ul and i have one drop down for subcategories. the idea is that when i click on any link in main categories it should show the related subcategories in drop down and when i click on sub category it should show the product details below drop down in list view. i did all this but now looking for ajax to do this for me.
i searched for it but mostly i found drop down for both main and sub categories but i do not need drop down for main categories. send me just an example or any link that have this whole thing rest i will do my home work.
all the record is fetch from database three table that are linked through FK.
thanks in advance for any kind of help.
<div id="main-cat">
<ul>
<li></li>
<li></li>
<li></li>
</ul>
</div>
<div id="sub-cat">
<select>
<option></option>
<option></option>
<option></option>
</select>
<div id="products">
<ul>
<li></li>
<li></li>
<li></li>
</ul>
now what i want to do is when page loads it show ist div with main categories and when i click any main cat it update the drop down of sub cat accordingly with ajax and then when subcat loads and i click any of the sub cat it loads the third div accordingly with ajax.
hope it will help now