What's the proper syntax to make this work: document.myForm.myField.value = newValue; (Where red portions are variables) I thought it should be something like: document.(eval(myForm)).eval(myField).value = newValue; ...but it's not working and cannot seem to find a reference for the proper way to write it. Thanks for any input
It isn't in XHTML, that's true. Usually the best thing to do is to call the form fields by theyr id, but there are many people who still does things this way.
Thanks for the feedback and suggestions. Should've had morning coffee before posting. I resolved this by using: document.getElementById(myField).value = newValue;