Código PHP:
<script>
function funcion(){
if(document.frm.si.checked == true){
document.frm.txt.disabled = false;
}
else{
document.frm.txt.disabled = true;
}
}
</script>
<form name="frm">
Si <input type="checkbox" name="si" onClick="funcion()" /><br />
No <input type="checkbox" name="no" onClick="funcion()" /><br />
<input type="text" name="txt" />
</form>
O directamente, sin tener que definir ninguna función:
Código PHP:
<form name="frm">
Si <input type="radio" name="si" onClick="if(this.checked == true){document.frm.txt.disabled = false;}else{return false;}" /><br />
No <input type="radio" name="no" onClick="if(this.checked == true){document.frm.txt.disabled = true;}else{return false;}" /><br />
<input type="text" name="txt" />
</form>