collapse hide table problem

hi when i load the page below,i see (-) ..that is everythig is expanded. i that when i load t epage it should have (+)..ie everythign collapsed.

i am using the above concept to show som e tables i want to collapse them all than show it.

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="ColExpTest.aspx.vb" Inherits="ServersNet.ColExpTest"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
      <HEAD>
            <title>ColExpTest</title>
            <script>
      function showHideGrid(anch, trId)
      {
     var gridTr = document.getElementById(trId);
     // Expand or contract grid depending upon the inner text of anchor
     if(anch.title == "Collapse")
     {
          if(typeof(gridTr) != "undefined")
               gridTr.style.display = "none";
          anch.title = "Expand";
          anch.innerHTML = "(+)";
     }
     else
     {
          if(typeof(gridTr) != "undefined")
               gridTr.style.display = "block";
          anch.title = "Collapse";
          anch.innerHTML = "(-)";
     }
}
            </script>
            <meta content="Microsoft Visual Studio.NET 7.0" name="GENERATOR">
            <meta content="Visual Basic 7.0" name="CODE_LANGUAGE">
            <meta content="JavaScript" name="vs_defaultClientScript">
            <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
      </HEAD>
      <body>
            <form id="Form1" method="post" runat="server">
                  <table>
                        <tr>
                              <td align="right" width="100%"><A title="Collapse" onclick="showHideGrid(this, 'trEqpDisp')" href="#" target="_self">(-)</A>
                              </td>
                        </tr>
                        <tr id="trEqpDisp">
                              <td align="right" width="100%">
                                    <!--Your code to be expanded/collapsed-->
                                    <table>
                                          <tr>
                                                <td>
                                                      <asp:Label id="Label1" runat="server">Label</asp:Label></td>
                                          </tr>
                                    </table>
                              </td>
                        </tr>
                  </table>
            </form>
      </body>
</HTML>
LVL 1
samir25Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

amit_gCommented:
Change

                         <td align="right" width="100%"><A title="Collapse" onclick="showHideGrid(this,
'trEqpDisp')" href="#" target="_self">(-)</A>
                         </td>
                    </tr>
                    <tr id="trEqpDisp">

to

                         <td align="right" width="100%"><A title="Expand" onclick="showHideGrid(this,
'trEqpDisp')" href="#" target="_self">(+)</A>
                         </td>
                    </tr>
                    <tr id="trEqpDisp" style="display:none">

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.