I have a text HTML control that is created by a function called in the OnClientClick
of the button. The problem is that every time I add a new Textbox
, the old data goes out.
What do you do to prevent it from going out?
Javascript Function
function novo() {
var form, quant;
if (parseInt(i) < 51) {
form = "<table width='96%' border='0'><tr><td width='8%' class='tblNormal' align='Right'>CPF:</td>"
form = form + "<td width='12%' class='tblNormal'> <input type='text' onkeypress='FiltraTecla(event);' id='cpf" + i + "' value='' size='10' maxlength='10' onblur='valorDoCampo(this.value, " + i + ")'> "
form = form + "</tr></table>"
document.getElementById('<% =qtd.ClientID %>').value = i;
i = i + 1;
formularios.innerHTML = formularios.innerHTML + form + "<br>";
}
else {
alert("Numero máximo excedido.");
}
return false;
}