Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

parent-child table relation

 
Vrunda Joshi
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello
in my project i want to display a parent table with it's respective child table.on click of a row in parent table,respective child table needs to be displayed in the bottom frame,
how do i do this?
thanks in advance
-vrunda divekar
 
A GPuvathingal
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Vrunda,
You could probably try this out--
1) Put the child table in the bottom frame within 'div' tag with "visibility:hidden"
2) Have an 'onclick - showChild()' function in the 'td' tag of the parent table

3)This function showChild()will change the visibility of the bottom frame child table to "show"
Should work :-) All the best
Anita :-)
 
Vrunda Joshi
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
thanks for the reply,i have tried it out with .jsp and onclick of parent table cell,i have reloaded the child table.it's working fine now.
but now the problem is,to get the cell value of parent table,i have used .innerText for the <tr> tag.this gives me the cell value
eg:
<tr bgcolor="#d0d0d0" onmousedown="getData(this)">
<td>Name</td>
<td> </td>
</tr>
in function getData,i can do obj.innerText to get the "Name" value.
But now it's not working with Netscape. innerText is not supported in netscape i suppose.is there any way out to this,
thanks in advance
=Vrunda Divekar
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic