Ho un grosso problema con IE. Mi serve uno script che in base ad un numero messo in un campo di input tipo text, mi aggiunga tante righe quanto indicato. Con FireFox, Mozilla e tutti gli altri la cosa funziona perfettamente, ma IE no! Non riesco a capire perché. Da premettere che ho usato l'innerHTML per effettuare l'inserimento.

Ecco il codice javascript:
codice:
function gen_campi(val) {
	campi='';
	for (i=n; i < val; i++)
		campi+='<tr><td>Cognome:</td><td><input type="text" name="cognome'+i+'"></td><td>Nome:</td><td><input type="text" name="nome'+i+'"></tr>'
	
	document.getElementById('campi').innerHTML=campi;
}
Ed ecco la parte in HTML:
codice:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Registro di Classe</title>
  <script type="text/javascript" src="path.js"></script><script type='text/javascript'>n=4</script>
</head>

<body>



<form action='?act=done' method='post'>
Aggiungi Campi: <input type='text' maxlength='2' style='width:21px; text-align:center' value='4' onChange='gen_campi(this.value)'>



<table border=0 celpadding=0 width=500px>
<tr><td>Cognome:</td><td><input name='c_1' type='text' value='xxxx' onChange='mod(this, this.id)' /></td><td>Nome:</td><td><input id='n_1' name='n_1' type='text' value='yyyy' onChange='mod(this, this.id)' /></td></tr>
<tbody id=campi'></tbody>
</table>
</form>
</body>
</html>
Perché quel dannato Browser da errori? X3