Bonjour, je n'arrive pas à mettre en oeuvre getElementById() dans Firefox

Voici mon test :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
function renvoieVal(nlig) {
 
alert(document.getElementById("liste").rows[nlig].cells[0].innerText);
 
}
Cette fonction est appellée comme ça :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
 
<table name="liste" id="liste" width="100%" border="1" cellspacing="0" cellpadding="0">
<?
//affichage des articles
$i = 1;
while ($line_art = mssql_fetch_array($res_art))
{
	echo "<tr class=\"texte\">
		<td><a href=\"#\" OnClick=\"renvoieVal($i)\">".$line_art['Art_Code']."</a></td>
		<td>".$line_art['Art_Libelle']."</td>
		</tr>";
	$i++;
}
?>	
</table>
Mon pb est que "document.getElementById("liste").rows[nlig].cells[0].innerText" renvoie "Undefined". Par contre dans IE, ça fonctionne.

Merci d'avance pour vos réponses.

Matrouba