It's not a secret anymore!*
The moose likes HTML, CSS and JavaScript and the fly likes parent-child table relation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "parent-child table relation" Watch "parent-child table relation" New topic
Author

parent-child table relation

Vrunda Joshi
Ranch Hand

Joined: Dec 03, 2001
Posts: 104
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

Joined: May 23, 2002
Posts: 10
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

Joined: Dec 03, 2001
Posts: 104
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: parent-child table relation
 
Similar Threads
iBatis resultMap groupBy Question
dynamic table with sort
specific TD value
Association problem in delete
JTable - Selected row