Posted by Bobbo on 11/28/28 11:54
bradley_d_watkins@hotmail.com wrote:
>
> The first one alert returns the first table, but the second alert gives
> an error....
>
Try making a separate page with just two tables and some cut-down
javascript, then you'll be able to see more clearly what's going on.
e.g. The following code shows you the Id (if any) and how many rows are
in each of the tables on your page. Alter the alert statement and see
what happens.
var tabs = document.getElementsByTagName("table");
var i = 0;
for(i = 0; i < tabs.length; i++)
{
alert(tabs[i].id);
alert(tabs[i].getElementsByTagName("tr").length);
}
Navigation:
[Reply to this message]
|