Hey, you are using the insertBefore method wrong, this is why your argument is invalid:
see here
http://groups.google.com/group/comp....9ba423f5adf39c
Code:
var errorlist = document.createElement("UL");
errorlist.setAttribute("id","errormessages");
var targetelement = document.forms["adduserform"];
if (targetelement != null)
{
targetelement.parentNode.insertBefore(newA, refObj);
}
You always need to call the DOM methods insertBefore and appendChild on
the parent node you want to append to or insert into.
HTH's
Boog's