Looking for some help here. Sorry for bothering you all!

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


 <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">



The Javascript

 <script type="text/javascript">
					function toggle(){
 <script type="text/javascript">
					function toggle2(){

2nd JSP

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

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”>
<td id=“test”</td>

Here’s a working solution for you, using the headers attribute. http://jsfiddle.net/KtnkF/1/

If you would rather not use the headers attribute in the table, it can also be done with a bit of additional scripting effort, as in http://jsfiddle.net/KtnkF/2/

This is great! However the buttons are on a seperate .jsp
How can I get them to communicate with the table that is on a different one…?
For example
1.jsp has the buttons
and 2.jsp has table…

woops! Ignore that…
I believe I have gotten it to work. Will post back shortly :slight_smile: