[Javascript] Appending an input to a form in Internet Explorer
German Sibay
gsibay at hexacta.com
Wed Mar 23 15:19:18 CST 2005
Hello, I´m trying to append an input field to a form.. seems easy.
It works on Mozilla but it does not in IExplorer.
The last line (the append) throws an error "invalid argument"
Any clue?
function addInputField (form, fieldType, fieldName, fieldValue) {
var input = document.createElement("INPUT");
input.setAttribute('type', fieldType);
input.setAttribute('name', fieldName);
input.setAttribute('value', fieldValue);
form.appendChild(input);
}
Germán Sibay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20050323/9b7b1781/attachment.htm>
More information about the Javascript
mailing list