[debutant] ajout de ligne a un tableau
	
	
		Voila j'ai un tableau existant et lors de la saisie je voudrais pouvoir ajouter des lignes dynamiquement
mais elles ne prennent pas en compte les parametres que je passe
De plus ca ne marche pas sous IE mais que sur Firefox je cherche une solution generaliste
Voila mon javascript 
	Code:
	
| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 
 |  
<script type="text/javascript" language="javascript">
	function ajout_contact()
	{	
		var tableGeneral = document.createElement('table');
 
		var table = document.createElement('table');
		table.className = 'client';
 
		var ligneChamp = document.createElement ('tr');
		var ligneTel = document.createElement('tr');
		var ligneGeneral = document.createElement('tr'); 
		var ligneTable = document.createElement('tr');
 
		var cellDate = document.createElement ('td');
		cellDate.className ="tableauChampMini";
 
		var cellTable = document.createElement('td');
		cellTable.setAttribute('colspan',5);
 
		var cellCode = document.createElement ('td');
		cellCode.className ="tableauChampMini";
 
		var cellFonction = document.createElement('td');
		cellFonction.className = "tableauChampReduit";
 
		var cellNom = document.createElement('td');
		cellNom.className = "tableauChampMoyen";
 
		var cellEMail = document.createElement('td');
		cellEMail.className = "tableauChampMoyen";
 
		var cellGeneral = document.createElement('td');
		cellGeneral.colspan ='5';
 
		var cellLibTel = document.createElement('td');
		cellLibTel.className = 'tableauLibelleMini';
 
		var cellTel = document.createElement('td');	
		cellTel.className = 'tableauChampReduit'; 
 
		var cellLibFax = document.createElement('td');
		cellLibFax.className = 'tableauLibelleMini';
 
		var cellFax = document.createElement('td');
		cellFax.className = 'tableauChampReduit';
 
		var cellLibPort = document.createElement('td');
		cellLibPort.className = 'tableauLibelleMini';
 
		var cellPort = document.createElement('td');
		cellPort.className = 'tableauChampReduit';
 
		var dateCreation = document.createElement('input');
		dateCreation.type= 'text';
		dateCreation.name='m_DateCreation';
		dateCreation.setAttribute('maxlength',8);
		dateCreation.setAttribute('size',"8");
		dateCreation.style.width = '100%';
 
		var codeFonction = document.createElement('input');
		codeFonction.type= 'text';
		codeFonction.setAttribute('name','m_CodeFonction');
		codeFonction.setAttribute('maxlength',2);
		codeFonction.size='2';
		codeFonction.style.width = '100%';
 
		var fonction = document.createElement('input');
		fonction.type='text';
		fonction.setAttribute('name','m_Fonction');
		fonction.setAttribute('maxlength',24);		
		fonction.size='24';
		fonction.style.width = '100%';
 
		var nom = document.createElement('input');
		nom.type='text';
		nom.setAttribute('name','m_NomContact');
		nom.setAttribute('maxlength',40);;		
		nom.size='40';
		nom.style.width = '100%';
 
		var EMail = document.createElement('input');
		EMail.type='text';
		EMail.setAttribute('name','m_EMail');
		EMail.setAttribute('maxlength',40);
		EMail.size='40';
		EMail.style.width = '100%';
 
		var libelleTel = document.createTextNode('Tel');
 
		var tel = document.createElement('input');
		tel.type='text';
		tel.setAttribute('name','m_Telephone');
		tel.setAttribute('maxlength',20);		
		tel.size='20';
		tel.style.width = '100%';
 
		var libelleFax = document.createTextNode('Fax');
 
		var fax = document.createElement('input');
		fax.type='text';
		fax.setAttribute('name','m_Fax');
		fax.setAttribute('maxlength',20);		
		fax.size='20';
		fax.style.width = '100%';
 
		var libellePort = document.createTextNode('Portable');
 
		var port = document.createElement('input');
		port.type='text';
		port.setAttribute('name','m_Portable');
		port.setAttribute('maxlength',20);		
		port.size='20';
		port.style.width = '100%';
 
		cellDate.appendChild (dateCreation);
		cellCode.appendChild(codeFonction);
		cellFonction.appendChild(fonction);
		cellNom.appendChild(nom);
		cellEMail.appendChild(EMail);
 
		cellLibTel.appendChild(libelleTel);
		cellTel.appendChild(tel);
		cellLibFax.appendChild(libelleFax);	
		cellFax.appendChild(fax);
		cellLibPort.appendChild(libellePort);
		cellPort.appendChild(port);
 
		ligneChamp.appendChild(cellDate);
		ligneChamp.appendChild(cellCode);
		ligneChamp.appendChild(cellFonction);
		ligneChamp.appendChild(cellNom);
		ligneChamp.appendChild(cellEMail);
 
		ligneGeneral.appendChild(cellLibTel);
		ligneGeneral.appendChild(cellTel);
		ligneGeneral.appendChild(cellLibFax);
		ligneGeneral.appendChild(cellFax);
		ligneGeneral.appendChild(cellLibPort);		
		ligneGeneral.appendChild(cellPort);
 
		table.appendChild(ligneGeneral);
		cellGeneral.appendChild(table)
 
		ligneTel.appendChild(cellGeneral);
 
		tableGeneral.appendChild(ligneChamp);
		cellTable.appendChild(tableGeneral);
		ligneTable.appendChild(cellTable);
		document.getElementById('contactTable').appendChild(ligneTable);		
 
	}
</script> | 
 Merci d'avance