i have 2 drop down boxes and i want to disable the second one while selecting any value from first drop down or vice versa.
But not able to find the solution, though i tried the below code but it doesn’t work for me
/* first drop down
<select name=”dd1″ id=”dd1″ >
<option value=”0″ selected=”selected”>Select</option>
<option value=”1″> 1 </option>
<option value=”2″ onchange=”disable()”> 2 </option>
</select>
/* 2nd drop down
<select name=”dd2″ id=”dd2″ >
<option value=”0″ selected=”selected”>Select</option>
<option value=”1″> 3 </option>
<option value=”2″> 4 </option>
</select>
/*js code
function disable()
{
document.frm_contact.dd2.disabled=true;/* frm_contact is a form name
}
pls help