You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Bill Siggelkow <bi...@bellsouth.net> on 2004/09/29 19:57:29 UTC

[OT] Re: Show / Hide table

Wrap the table in a <div> :

<div id="tableDiv" style="{display:none}"><table>....</table></div>

Then call an JS function from your radio button (using something like an 
onclick listener).

    <script language="javascript">
       function showTable() {
         document.getElementById("tableDiv").style.display = "inline";
       }
       function hideTable() {
         document.getElementById("tableDiv").style.display = "none";
       }
    </script>

JUTTIGA PHANIDHAR wrote:

> Hi,
> 
> Can anyone let me know how to display or hide a table
> based on the choice of a radio button.
> 
> Initially both the tables will be hidden and one among
> them will be displayed on the click of a radio button.
> 
> Thanks.
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org