I have two select
elements:
<select class="form-control" id="shape" name="shape">
<option value="a">a</option>
<option value="b">b</option>
<option value="c">c</option>
<option value="d">d</option>
<option value="e">e</option>
<option value="f">f</option>
</select>
The second one shows the sub categories of the first:
<select class="form-control" id="waist" name="waist">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
These are part of a form
that is used for other operations and names and values of these can be changed.
In my database I have images of a-1
, a-2
, a-3
, b-1
, b-2
, b-3
, c-1
, c-2
, c-3
and so on. I have a space for images which should be updated once options have been chosen from both select
elements.
I have read many forms but they used only one dropdown. I am bit new in javascript so can anybody help with this? You can use PHP if you want.