Can anyone tell me the best way to access a hidden object in a form? I
could use a hard-coded index to the elements of the form, but it's too
easy to add something before the hidden object and mess up the
indexing.
For example:
The form has a tagid of "myForm"
The hidden object has a tagId of "myHiddenOb j"
I can get the form elements by using
var formElements = document.getEle mentById('myFor m').elements
But there doesn't seem to be any way to do this:
document.getEle mentById('myHid denObj')
Assuming I have the elements as obtained above, none of these have
worked for me either:
formElements['myHiddenObj']
formElements["myHiddenOb j"]
formElements.my HiddenObj
Anyone have an idea?
could use a hard-coded index to the elements of the form, but it's too
easy to add something before the hidden object and mess up the
indexing.
For example:
The form has a tagid of "myForm"
The hidden object has a tagId of "myHiddenOb j"
I can get the form elements by using
var formElements = document.getEle mentById('myFor m').elements
But there doesn't seem to be any way to do this:
document.getEle mentById('myHid denObj')
Assuming I have the elements as obtained above, none of these have
worked for me either:
formElements['myHiddenObj']
formElements["myHiddenOb j"]
formElements.my HiddenObj
Anyone have an idea?
Comment