Is there any way to add input elements to an existing form element in ff's DOM. Both the form element and its form.elements-property are read only, so appending to these is not possible. It doesn't seem that a forms' input elements is part of the forms' children either (they are not contained in form.childNodes).
I find it strange that a form can't be altered in this way, because when adding html dynamically through innerHTML you'd have to create a new form to accommodate any new inputs...
regards tores
edit: Found a solution
Code: Select all
form = document.getElementById('formelement');
input = document.createElement('input');
input.value = 'something';
form.appendChild(input);