createElement should be used like this (to achieve a more stable version across browsers and platforms):
{
var oInput = document.createElement("input");
oInput.setAttribute("name", Name);
oInput.setAttribute("type ", text);
oInput.setAttribute("value ", Value);
return Parent.appendChild(oInput);
}
//Example call:
addInput("UserList", "Joe", document.frmUsers);
[/code]
/Robert
|