I'm trying to to enable a text field with javascript (it is disabled originally). The name of the text field is duo[x]. (I need to keep the brackets so php will reconize it as an array.)
In javascript, I was trying to use to use: document.form.duo[x].disabled = false; (but that didn't work).

Here is what I have right now:
<script type="text/javascript">
function change(code) {
var a = "Duo[" + code + "]"; document.form.a.disabled = false;
} </script> </head> <body> <form name="form"> <select name="select" onchange="return change(x)"> <option>Opt 1</option> <option>Opt 2</option> </select> <input type="text" name="duo[x]" disabled></input> </form> </html>