I have 3 select boxes: selCountry, selCity and selSuburb.
If no selection is made in selCountry, then the remaining 2 select boxes should be inactive.
If selection is made in selCountry, then selCity should be active and selSuburb inactive.
If selection is made in selCountry and selCity, then selSuburb should also be active.
I tried the code below (for 2 select boxes), but how do I incorporate 3 select boxes?
Many thanks from the new kid on the block!
==========================
function toggleCountryCitySuburb(country_type){
if(! country_type) return;
var frm = country_type.form;
if(country_type.value == ""){
frm.selCity.disabled = true;
frm.selSuburb.disabled = true;
} else {
frm.selCity.disabled = false;
frm.selSuburb.disabled = true;
}
}
===============================
If no selection is made in selCountry, then the remaining 2 select boxes should be inactive.
If selection is made in selCountry, then selCity should be active and selSuburb inactive.
If selection is made in selCountry and selCity, then selSuburb should also be active.
I tried the code below (for 2 select boxes), but how do I incorporate 3 select boxes?
Many thanks from the new kid on the block!
==========================
function toggleCountryCitySuburb(country_type){
if(! country_type) return;
var frm = country_type.form;
if(country_type.value == ""){
frm.selCity.disabled = true;
frm.selSuburb.disabled = true;
} else {
frm.selCity.disabled = false;
frm.selSuburb.disabled = true;
}
}
===============================