[Javascript] Appending an input to a form in Internet Explorer
Hassan Schroeder
hassan at webtuitive.com
Wed Mar 23 16:36:11 CST 2005
German Sibay wrote:
> The last line (the append) throws an error “invalid argument”
> 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);
> }
What's the "form" argument -- a string or a DOM node?
--
Hassan Schroeder ----------------------------- hassan at webtuitive.com
Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com
dream. code.
More information about the Javascript
mailing list