• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

DHTML + DOM

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I�m using DOM Level 1 in my HTML pages, and I couldn�t find how to retrieve the content in a table cell. The HTMLTableCellElement doesn�t have even a 'value' attribute.
Somebody knows a better way to do this?

Excuse me if this isn�t the best group to put my question.
 
Josiel Oliveira
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got an answer in another newsgroup.
Using the collection childNodes you can
navigate inside the content of the cell.

thanks, all, anyway
 
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
This is some news to me !
You can retrieve the value of a table cell , i.e <td>? I am not too sure if I have understood your question right and that gives me lot of inquisitiveness too to know more about it. I would appreciate if you can paste your code here or mail me at doshi_milan@hotmail.com.
Thanks,
Regards,
Milan Doshi
[ June 19, 2002: Message edited by: Doshi Milan ]
 
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you have
<TD ID="td1
to get content of this td using JavaScript:
document.getElementById("td1").innerHTML
or
document.getElementById("td1").innerText
those properties will be readonly for TD tag in IE.
also you could use DOM model. At this case, if your td contains just a text, this text will be represented by TextNode element. So
document.getElementById("td1").firstChild.nodeValue
should work
reply
    Bookmark Topic Watch Topic
  • New Topic