e.g. document.forms[0].my_new_inserted_element.value // Returns undefined or Object error.
For a start, you should be using the elements collection:
Code:
document.forms[0].elements.my_new_inserted_element.value
Secondly, I don't know if this is what you've run into here or not, but you've set yourself up to be bitten by the most common innerHTML problem in the book: it clears all non-serialised data, and that includes form values. Thus, when you add an element to the form using the select, the select will immediately be not only reset to its default value, but actually destroyed and created anew, as will all the other form elements -- which will likely result in the required removal of the new element.
As jscheuer1 and blm126 have said, stay away from innerHTML -- especially where forms are involved.
Bookmarks