HTML Table ID

G

Guest

I get a collection of tables as below in Javascript

var eleTables = document.getElementsByTagName("table");

I then loop through my tables as below

My Table id is always blank when I try to alert it and yet my table has an
id (<table border="0" cellspacing="0" cellpadding="0"
id="igtabctl00_MainContent_uctrFinancialAccountsContainer_UltraWebTab1"
width="100%" height="80%" style="position:relative;">)

Anyone know why this is the case?

for (var i=0; i < eleTables.length; i++)

{

var elTableID = eleTables;

alert('table id ' + eleTables.id);

}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top