Hi all,

I am getting a strange error while trying to get-ElementById()- a tbody element. Here is the chunk of code

function displayStats(data, period, routesNo) 
	var tb = document.getElementById("resultsTbody");
	var inforow = document.createElement('tr');
	inforow.setAttribute("id", "aRow");
	var infocell = document.createElement('td');
	infocell.setAttribute("id", "infoCell");
	infocell.innerHTML = "string";
HTML Code:
<table id="statisticsResultsTbl" border="1" width="600" align="center">
	<thead class="tbodies" id="headTbody">
		<tr class="darkBlue">
			<td id="statsMainHd" align="center" class="db_title_12pt">Statistics Results</td>
	<tbody id="resultsTbody"></tbody>
In FF i get the error: "tb has no properties"
in IE7: 'null' is null or not an object
in opera is not working at all

What the heck...i have the same code elsewhere and it's working...

any ideas??

thanks in advance