File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "parent-child table relation" Watch "parent-child table relation" New topic

parent-child table relation

Vrunda Joshi
Ranch Hand

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

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
thanks for the reply,i have tried it out with .jsp and onclick of parent table cell,i have reloaded the child'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
<tr bgcolor="#d0d0d0" onmousedown="getData(this)">
<td> </td>
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 there any way out to this,
thanks in advance
=Vrunda Divekar
I agree. Here's the link:
subject: parent-child table relation
It's not a secret anymore!