Hi All,

First time posting and I'm having a major problem with this website, and don't know a way to fix it.
Here it is...
Right now I need a table to remove a column based on either Button1 is clicked or Button 2.

Unfortunately that table is loaded on a seperate .jsp file. From the 2 buttons that are on another jsp.
And I don't know how to link them...

I'm trying to set it, so when you press Button1 it will hide the 'test' column.
And then when you press Button2 it will show the 'test' column

Also note that the table I'm referring to is nested inside of refreshGrids, from there it links to the 2nd JSP.

1st JSP

The HTML
HTML Code:
 <button type="button" onclick="toggle2();"><h1>Button1</h1></button>        
           <button type="button" onclick="toggle();"><h1>Button2</h1></button>
<div id="overlay" class="window">
<div class="messageContainer">
<div id="refreshGrid">
</div>
</div>
The CSS
Code:
#test{display:none;}
The Javascript
Code:
 <script type="text/javascript">
					function toggle(){
					$(this).parents("test").show();
					};
				</script>
Code:
 <script type="text/javascript">
					function toggle2(){
					$(this).parents("test").hide();
					};
				</script>
2nd JSP

Code:
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ page contentType="text/html; charset=UTF-8" %>
<html>
   <body>
      <table class="bordered">
         <col width="75" />
         <col width="105" />
         <col width="70" />
         <col />
         <thead>
            <tr>
               <th>User</th>
               <th>Date Grid</th>
               <th>Grid</th>
               <th>Text</th>
            </tr>
         </thead>
         <tbody id="GridBody">
            <s:iterator value="%{gridBeans}" status="stat">
                  <td>
                     <s:property value="userName" />
                  </td>
                  <td>
                     <s:property value="gridTime" />
                  </td>
                  <td id="test">
                     <s:property value="numgrid" />
                  </td>
                  <td>
                     <s:property value="gridText" />
                  </td>
               </tr>
            </s:iterator> 
         </tbody>
      </table>
      </div>
      </div>
      </div>
   </body>
</html>
Any help here please


The correct nesting of the divs according to Firebug is this..
<div id="overlay" class="window">
<div class="messagecontainer">
<div id="refreshGrid">
<table class="bordered">
<tbody id="GridBody">
<tr>
<td></td>
<td id="test"</td>
<td></td>
</tr>