[thelist] document.createElement?

Peter-Paul Koch gassinaumasis at hotmail.com
Wed Mar 26 10:57:21 CST 2003

>>var a=document.getElementById('contentsUL');
>>var b=a.getElementsByTagName('ul');
>>  var c=document.createElement('a');
>>  a.insertBefore(c,b[d]);
>a is not the parent of c. There's a LI element in between. So the browser 
>tries to find c as a child node of a and fails.

Sorry, should have read: a is not the parent of b[d].


ppk, freelance web developer
Interaction, copywriting, JavaScript, integration
Column "Keep it Simple": http://www.digital-web.com/columns/keepitsimple/
W3C DOM Compatibility Table, expanded & updated

STOP MORE SPAM with the new MSN 8 and get 2 months FREE* 

More information about the thelist mailing list