I have two categories in my database table.
Women Fashion and Men fashion
Under Men Fashion, I have Men Shoes
Under Women fashion, I have Female bag
I want to a javascript I will use in HTML Form select so that when one selects Women Fashion, he/she will see list of items under women fashion like women bag in the second form or when one select Man Fashion, he/she will see list of items under Men fashion like Men shoe in the second form as well.
sample
<form class="form">
<div class="form-group">
<select id="box1" name="num">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
<select id="box2" name="letters">
<option value="a">A</option>
<option value="b">B</option>
</select>
</div>
</form>
then I have this
$("#box1").on('change', function () {
var value = $(this).val();
if (value === "1" || value === "2") {
$("#box2").show();
} else {
$("#box2").hide();
}
});
but don't know how to implement it using the database value
Please help