Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

specific TD value

 
Vrunda Joshi
Ranch Hand
Posts: 104
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,
in my application i am having table with parent /child relation.on click of a cell in parent table i am displaying respective child table.this works fine,
but now the prob is,when i click on a row in parent table,i want to retreive value of only first cell which is the primary key for child table.
if i do .innerText to the <TR> i get all the column values.
is there any way out to this?i want this to work out in both IE and Netscape
this is a bit urgent
thanks in advance
-vrunda
 
Yuriy Fuksenko
Ranch Hand
Posts: 413
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If var trRef is point to your TR,
than trRef.firtsChild will point to first TD. It should work in NS6 and IE5.5+
Or, you could assign id to your TR tags, and to first TD in TR, so knowing id for TR you can get id for corresponding TD, and use document.getElementByID()
 
Vrunda Joshi
Ranch Hand
Posts: 104
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello
thanks a lot Yuriy Fuksenko,i will try to work it out
-Vrunda divekar
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic