I have a set of 6 radio buttons, infront of each one there's a textbox
...
i need all textboxes disabled .... once one of the radio buttons is
selected, the texbox infront of it will be anabled to type in ...
----
<script type="text/javascript">
var currentEnabled = null;
function enableElement(elem) {
if (currentEnabled) {
currentEnabled.disabled = true;
}
elem.disabled = false;
currentEnabled = elem;
}
</script>
<form action="">
<input type="text" name="inp1" disabled="disabled">
<input type="radio" name="sel" value="1"
onclick="enableElement(this.form.elements['inp1']);">
<br>
<input type="text" name="inp2" disabled="disabled">
<input type="radio" name="sel" value="2"
onclick="enableElement(this.form.elements['inp2']);">
<br>
<input type="text" name="inp3" disabled="disabled">
<input type="radio" name="sel" value="3"
onclick="enableElement(this.form.elements['inp3']);">
</form>
----
You might want to have the textboxes enabled by default and use
a script to disable them. Then they still work if Javascript is
disabled.
Good luck.
/L