Expanding a column

I'm having problems when I try to change the size of a column in one of my tables.  Basically, I want to hide a column (by initially setting the size to 0) and then expand it to show a table within this column.  The problem that I'm experiencing is that when the column expands to the correct size, the size of the preceeding columns in the table are then reduced and the format of the table is all messed up.  I'm using JavaScript to set the size of the DIV to 450.  Below is the JS & html that I'm using for my page.

<script language="JavaScript">
function ResizeColumn() {
      var objRS = document.getElementById("EmpInfo").style;
      objRS.display="block";
}
</scipt>

<table border="0" cellspacing="0" cellpadding="0">
      <tr>
            <td width="150"><p style="margin-left: 15">Employee Name</td>
            <td width="150">Title</td>
            <td width="0">
                  <div id="EmpInfo" style="display: none">
                        <table border="0" width="450" cellspacing="0" cellpadding="0">
                          <tr>
                            <td width="33%">InfoA</td>
                            <td width="33%">InfoB</td>
                            <td width="34%">InfoC</td>
                          </tr>
                        </table>
                  </div>
            </td>
            <td width="20" align="right">Yrs</td>
            <td width="10">x</td>
      </tr>
</table>

Please note that when the column is expanded, the table should exceed the size of the screen.  I noticed that the horizontal scrollbars do not appear at the bottom of the window when the DIV is displayed.
TheChosAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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.

raj3060Commented:
Try this:

<table border="0" cellspacing="0" cellpadding="0">
     <tr>
          <td width="150"><p style="margin-left: 15">Employee Name</td>
          <td width="150">Title</td>
          <td width="450" id="EmpInfo" style="display: block">              
                    <table border="0" width="100%" cellspacing="0" cellpadding="0">
                      <tr>
                        <td width="33%">InfoA</td>
                        <td width="33%">InfoB</td>
                        <td width="34%">InfoC</td>
                      </tr>
                    </table>              
          </td>
          <td width="100" align="right">Yrs</td>
          <td width="100">xyz</td>
     </tr>
</table>
raj3060Commented:
This should be 'none' at first:

<td width="450" id="EmpInfo" style="display: none">
TheChosAuthor Commented:
This almost works.  What appears to be happening is that when I expand the column, the table expands but only to the size of the screen.  It adjusts all the columns so that everything fits width-wise on the screen.  How can I make the table expand beyond the size of the screen?
raj3060Commented:
Define the table width how much you want it to be:
 e.g.
<table border="0" cellspacing="0" cellpadding="0" width="850">

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
TheChosAuthor Commented:
Thank you, it worked perfect!
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
JavaScript

From novice to tech pro — start learning today.