Or more correctly:
alert(tds(i).getAttribute(
Main Topics
Browse All TopicsHi All,
I have a snippit of my html from View Source:
I am try to access the 3565 which is one of the values in a tabular report. I want to get all the amounts in form.
<td headers="CMT_OPTION_000" class="t2data"><input type="hidden" name="f47" value="Option 1" />Option 1</td><td align="right" headers="Price NetVision Member_000" class="t2data">3565</td>
I tried using:
var tds = document.getElementsByTagN
for (var i=0; i<tds.length; i++) {
alert(tds(i).headers);
}
Then I was going to get the innerHTML
BUT the alert shows undefined
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Actually the alert(alltds[j].headers); worked fine... it was something else in my syntax..
Thanks for the help..
Incase anyone needs to use headers:
var alltds = theTable.getElementsByTagN
var Option1row = false;
for(var j=0;j<alltds.length;j++){ // for alltds
//alert(alltds[j].headers)
if (alltds[j].headers=="CMT_O
var elemAllC = alltds[j].getElementsByTag
// Check the only 'input' element in the 'td'
if(elemAllC[0].value=='Opt
Option1row=true;
}else{
Option1row=false;
}
} //if my headers
if(!Option1row){ //(!Option1row)
if (alltds[j].headers=="Price
// Get the Row that we are in
var theRow = html_CascadeUpTill(alltds[
// Get all the input elements in that Row.
var elemAll = theRow.getElementsByTagNam
// Go through all 'input' elements to assign Original Value
for(var b=0;b<elemAll.length;b++){
if(elemAll[b].name=="f48")
var original = elemAll[b].value;
//if original is null then innerHTML is the original
if (original==''){ //chkorig
original = alltds[j].innerHTML;
elemAll[b].value = original;
}//chkorig
} //f48
}//elemAll for
var newPrice=stripCharsInBag(o
newPrice=stripCharsInBag(n
newPrice = parseFloat(newPrice)*disco
var strPrice = FormatWithDecimals(newPric
alltds[j].innerHTML = '$'+strPrice;
} // if Price
} //(!Option1row)
} // for LOOP alltds
Business Accounts
Answer for Membership
by: rhawkPosted on 2007-04-03 at 06:36:41ID: 18843143
Try changing the alert line to: headers));
alert(tds(i).getAttribute(