I have two text boxes, box1 and box2, and two radio buttons, radio1 and radio2. Well, my intention is, if i check radio1, box2 becomes disabled, and if i check radio2, box1 become disabled. How to do that?
That is clientside behavior you are describing, so you need to use javascript. Something like: <input type="radio" id="r1" onclick="enable(1);" /><input type="text" id="t1" /><br /> <input type="radio" id="r2" onclick="enable(2);" /><input type="text" id="t2" /><br /> <script type="text/javascript"> function enable(n){ for (var i=1;i<=2;i++){ document.getElementById('t'+i).disabled = (i!=n); } } </script> Code (markup):