Hi,
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:
Code:
<html>
<head>
<script type="text/javascript">
function change(code) {
var a = "Duo[" + code + "]";
document.form.a.disabled = false;
But you originally named the input name="duo[x]" and now you're saying the name is just "x" or "y" and so on for each input. You can't have it both ways.
You need to decide on how the inputs will be named or describe better what actual functionality you want and we can name the elements appropriately for you.
Bookmarks