Hope you're having a nice day and i'm much clear to describe my problem :)
I have a table of categories and a table of sub-categories. In my view, I want to let the user select a sub-category belonging to a category, for adding a product (Every product belongs to a sub-category). For that purpose, I want to show the user sub-categories when he selects a category. Like when he selects Clothes from Categories, I want to show Sub-categories like tops, shorts etc.
How do I do that? Just an idea would work.
Thanks.
For those who are having a problem:
This is my function in my
$(document.ready(function(){}));
in my viewAnd this is what i'm returning from my controller
Try this
call getjson in first dropdown onchange and pass the selected value to url and load the results in second dropdown . Hope this helps you
});