i am trying to disable a checkbox 1 when a particular drop down list 5th in the list is selected
can u please help me with that
Code:<div id="Div3"> <label class="pLabel"> Which of the following products have you purchased in the last 2 months. Please check all that apply.<br/> </label> <span > <input type="checkbox" name="CHKBOX_1" value="Product 1" id="Product1" tabindex="5" /> <label > Product 1</label> <input type="checkbox" name="CHKBOX_2" value="Product 2" id="Product2" tabindex="6" /> <label > Product 2</label> <input type="checkbox" name="CHKBOX_3" value="Product 3" id="Product3"tabindex="7" /> <label > Product 3</label> </span> <br/><br/> </div>Code:<select name="age"> <option value="age">Please select your age</option> <option value="18-24">18-24 </option> <option value="25-34">25-34 </option> <option value="35-50">35-50 </option> <option value ="50+" > 50+ </option> </select>Code:function validation(){ if ( document.form77.age.selectedIndex == 0 ) { alert ( "Please select your age." ); return false; } if (document.form77.CHKBOX_1.checked == false && document.form77.CHKBOX_2.checked == false && document.form77.CHKBOX_3.checked == false){ alert ('Please select a product 1 , 2 or 3'); return false; } if (document.form77.age.selected == 4 ){ document.form77.CHKBOX_1.checked.disabled == true; return false; }


Reply With Quote
Bookmarks