I have a drop down menu, with two options:
<select name="chs" value="" id = ""/>
<option value="">ICE Cream</option>
<option value="">Juice</option>
</select>
This is what I want to have: in the first page you see a select, with two option, if you choose ICE cream another select will appear with different flavors (chocolate, vanilla, etc), and the same for juice.
This is what I already have:
html:
<label>Choose Skin</label><br /><select name="na" value="" id = ""/>
<option value="">ICE Cream</option>
<option value="">Juice</option>
</select>
<select name="icecreamfla" value="" onchange="showSelect()" id = "framework"/>
<option id="jm">vanilla</option>
<option id = "wp">chocholate</option>
</select>
<input type="submit" name = "redirect" value="go" />
The JavaScript:
function showSelect()
{
var select = document.getElementById('skin');
if(select.value == "juice"){
alert('saeed khare!');
}
else{
var option = document.getElementById('icecreamfla');
option.style.display = 'inline';
}
}
option.style.display used to be ‘none’, then I changed it to inline.
if any one can help please do it.
Is this you want to do it .