Hi,
I have 2 lists in a form one for a type of property and the other for price type. What i want to do is have a function so if i select property "Flats" then the price type menu will alter to Per Week.
This is what i have so far but don't know how to go after this?
HTML
Cheers,
Adam
I have 2 lists in a form one for a type of property and the other for price type. What i want to do is have a function so if i select property "Flats" then the price type menu will alter to Per Week.
This is what i have so far but don't know how to go after this?
Code:
function doChange() {
var sel = document.forms[0].property_type.selectedIndex;
if (document.forms[0].property_type[sel].value = "Flat") {
}
}
Code:
<form>
<select name="price_type" id="price_type" style="width:120px;">
<option value="P/M">Let (Per Month)</option>
<option value="P/W">Let (Per Week)</option>
<option value="N/A">Buy</option>
</select>
<select name="property_type" id="property_type" style="width:120px;">
<option value="">Type</option>
<option value="Detached">Detached</option>
<option value="Semi Detached">Semi Detached</option>
<option value="Terraced">Terraced</option>
<option value="Flat">Flat</option>
<option value="Apartment">Apartment</option>
<option value="Bungalow">Bungalow</option>
<option value="Dormer Bungalow">Dormer Bungalow</option>
<option value="Maisonette">Maisonette</option>
</select>
</form>
Adam
Comment