views:

24

answers:

2

Hi all,

I have requirement where on selecting radio button in the main table a child table has to appear below. Can anyone help me......pls.

thx.

+1  A: 

Add an id to the child table.

<table id=`childTable`>
...
</table>

Add an onclick handler to the radio button

<input type="radio" name="radShowChild" onclick=showHideChild()>

Add a javascript function to do the hiding

function showHideChild()
{
   document.getElementById("childTable").style.visibility = "visible" ? "hidden" : "visible";
}

If you want to display specific "child" tables based on the radio button selected, pass the child table id as a parameter to the showHideChild() function.

Nivas
A: 

Thanks for the reply, this is my actual requirement.I have two tables Item attributes and Item attributes values. Onclicking Item attributes (i.e)e.g: ticket height chckbox the child table of ticket height should display. Like wise there will be 10 item attributes and its respective item attribute values. So on clicking each item attribute the child attr value table should display.

Ravi