This sounds more like a Javascript question as opposed to a PHP question.
Well all you have to do is on the radio button you have to define an "onclick" (or onchange but it doesn't work with IE) event on the two radio buttons like below :-
<form>
<input type="radio" id="radio1" name="radio2" onclick="document.getElementById('txt1').disabled=true"/>Beta <br />
<input type="radio" id="radio1" name="radio2" onclick="document.getElementById('txt1').disabled=false"/>Gamma<br />
<input type="text" name="txt1" id="txt1" /><br />
</form>
Note
onclick has been assigned the Javascript code that we wish to execute when someone clicks on the radio button.
Last edited by stephen84s; Dec 5th, 2008 at 11:26 am.
Reputation Points: 653
Solved Threads: 151
Nearly a Posting Virtuoso
Offline 1,316 posts
since Jul 2007