I have several form objects on my web page (the objects are check boxes and
text fields which are created dynamically from a db query). I am trying to
manipulate the form objects using JavaScript. If I hard code the object, the
code works perfectly. But, I need to dynamically change the form field. This
is what I have:
document.data.DPT85.disabled = false (this works perfectly, but the fields
all have differen numbers)
.Data is the name of the form
.DPT85 is the name of the text box
I want to dynamically choose the text box field.
I have a varible that captures the number (in this case 85). I want to store
the number in the varible like so:
sDPT = "DPT"+recNum (recNum equals the record number).
(the variable is successfully captured in this step)
My question:
How can I dynamically change the object to represent my variable?
I tried:
document.data.(sDPT).disabled = false
document.data.[sDPT].disabled = false
document.data.{sDPT}.disabled = false
Is this even supported?
TIA
RC-