A: 

Call appendChild on the UL element, not the form element.

Jeff Ober
+1  A: 

Hi

Shouldn't you to append the "li" to the "ul" instead of the form ?

function addTextBox() { var myUl = document.getElementById('___your_ul_id____'); <--- change this myUl.appendChild(document.createElement('li')).innerHTML = "Name "; }

aaa silly me! of course! thanks. working great now : ) and how can I unique name the created textbox? now all name is txt :(
artmania
+1  A: 

You need to append the new li to the ul, not the form element.

var ul = document.getElementById("ul_id");
ul.appendChild(document.createElement('li')).innerHTML = "Name <input type=\"text\" name=\"txt\" class=\"txt_input required\">";
Donal Boyle