I’m playing around with some JavaScript to teach myself some AJAX stuff. I’ve successfully come up with a script whereby I can change the contents of a table by the following JS command, where ‘example’ is the ID value of the HTML table element in question):
[code]
document.getElementById(‘example’).innerHTML = xmlHttp.responseText;
It works great, but what I would prefer to do is change the innerHTML of the <tbody> section within the table. Is there some JS attribute/function that will do this for me, rather than having to assign an ID to the <tbody> and use getElementById()? Something like:
[code]
document.getElementById(‘example’).[color=red]something_magic_here[/color].innerHTML = xmlHttp.responseText;