I want the ability to add another form element with the click of a
button.
This is what I have now:
<div id="myID"><INPUT TYPE="text" NAME="MyText"></div>
<input type="Button" value="Add Another" onclick="addItem()">
<script>
function addItem() {
myID.innerHTML+='<br><input type="Text" name="MyText">';
}
</script>
It does the job except if you click on the "Add Another" button, it
removes everything you have typed into form fields so far.
Can you use something like document.write to add into a div? Any other
advice?
Thanks for the help.