L
Leszek
function zmiana(ile){
var formObj = document.getElementById("dane").
while(formObj.childNodes.length > 3)
{
formObj.removeChild(formObj.lastChild);
}
for (i=1;i<=ile;i++){
pole=document.createElement("BR");
formObj.appendChild(pole);
a=document.createTextNode("Name of accompanying person #"+i+" ")
formObj.appendChild(a);
formObj.style.fontWeight='bold';
pole=document.createElement("input");
pole.type = "text";
pole.size="40";
pole.id="name"+i;
pole.name="name"+i;
formObj.appendChild(pole);
}
}
What should be in changed in line:
var formObj = document.getElementById("dane").
to make it work with something like this
<form name="dane">
<select name="accomp">
//instructions
</select>
</form>
Thanks.
Leszek
var formObj = document.getElementById("dane").
while(formObj.childNodes.length > 3)
{
formObj.removeChild(formObj.lastChild);
}
for (i=1;i<=ile;i++){
pole=document.createElement("BR");
formObj.appendChild(pole);
a=document.createTextNode("Name of accompanying person #"+i+" ")
formObj.appendChild(a);
formObj.style.fontWeight='bold';
pole=document.createElement("input");
pole.type = "text";
pole.size="40";
pole.id="name"+i;
pole.name="name"+i;
formObj.appendChild(pole);
}
}
What should be in changed in line:
var formObj = document.getElementById("dane").
to make it work with something like this
<form name="dane">
<select name="accomp">
//instructions
</select>
</form>
Thanks.
Leszek