he hecho esto de rapidito, a ver si te sirve de algo:
Código javascript
:
Ver original<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Untitled</title>
<script type="text/javascript">
window.onload = function(){
var radio = document.getElementById('radioB');
var campo = document.getElementById('campo');
if(campo.value == ''){
campo.disabled = 'disabled';
}
radio.onclick = function(){
campo.disabled = campo.disabled = 'disabled' ? '' : 'disabled';
}
}
</script>
</head>
<body>
<form>
<input type="text" id="campo" name="campo" value = 'b' />
<input name="radioB" id="radioB" type="radio" value="radioB" />RadioB
</form>
</body>
</html>