Hi guys this is my problem :
I have created a js function where I can add fields on the fly, but
there seems to be a small flaw with Mozilla.
If you try to click on "Add" button you can see that for every click
there is a new text field and this is really useful
because I don't need to refresh the page every time. It works 100% fine
with Internet Explorer but in Mozilla it seems to loose the values
I type in in field 2 or field 3 etc.
For example, if I have 2 lines and I click to get a third one, I loose
the values in the fields in line 2, and line 1.
If I have 3 lines and want to add another one, I loose the values for
lines 2 and 3, and 1.
Again, this works fine in IE, but not in Mozilla.
Any idea how to fix this?
*this is the page *
http://dev.shipco.com/temp/div.html
*this is the code*
<form Action ="Save.php?ID=106" Name="input1" Method = Post
Onsubmit="return Checkform(this);">
<div id="prova"></div>
<table width=100% border="0" align="center" cellpadding="3"
cellspacing="1" >
<script>
function htmlwrite()
buildHTML= "<input type=text><br>"
elem = document.getElementById('prova');
elem.innerHTML = elem.innerHTML + buildHTML;
}
</script>
</TD></TR>
<tr>
<td align=center colspan=2>
<input type=button class=button name=add
onClick="javascript:htmlwrite();" value = "Add TEXT FIELD">
</td>
</tr>
<Table>
Thanks a lot guys
Andrea