[nflug] Off Topic - Freezing HTML Table Column

joshj at linuxmail.org joshj at linuxmail.org
Wed Aug 16 12:23:10 EDT 2006


When we last left our adventurers...

> Could you Iframe the part of the page that you want to scroll

That's essentially what the div tags are for. I've been getting out of the 
habbit of using iframes since they are soon to become deprecated:

http://liorean.web-graphics.com/xhtml/comparison.loose-strict.html

But you could probably drop one in and get the same effect.

>
> On 8/16/06, Justin Bennett <Justin.Bennett at dynabrade.com> wrote:
>>
>>  That looks like it might work.  I didn't want to dump it to excel,
>>  because there are links off the table to update info, I don't want the
>>  user thinking they can then update it in excel.
>>
>>  Thanks!
>>
>>  joshj at linuxmail.org wrote:
>> >  When we last left our adventurers...
>> > 
>> > >  Sorry for the off topic post.  But I know some guys here do some Web
>> > >  work.
>> > > 
>> > >  What I'm looking for is a simple way to freeze a column on an html
>> > >  table (or equivalent) so that when the user scrolls, that column
>> > >  follows. It's for proofing a large dump of data from a database using
>> > >  PHP.
>> > > 
>> > >  Basically the first column is 'Item Number' and there is 40 or so
>> > >  other columns to the right. It's in just an HTML table now, and as
>> > >  the user scrolls with the browsers scroll bar to see more columns on
>> > >  the right, the item number obviously scrolls out of sight on the left.
>> > > 
>> > >  I know there all all kinds of complex DHTML plugins and things that
>> > >  can do this, I'm just looking for a simple solution.
>> > 
>> >  There's really no simple way to do it. The following would work. But
>> >  you'll probably run into formatting problems (which you could probably
>> >  circumvent by setting the height of each individual <td>:
>> > 
>> >      <table>
>> >        <tr>
>> >          <td valign="top">
>> > 
>> >      <table border="1" cellspacing="1" cellpadding="5">
>> >        <tr>
>> >          <td>
>> >            ID
>> >          </td>
>> >        </tr>
>> >        <tr>
>> >          <td>
>> >            100
>> >          </td>
>> >        </tr>
>> >        <tr>
>> >          <td>
>> >            200
>> >          </td>
>> >        </tr>
>> >        <tr>
>> >          <td>
>> >            300
>> >          </td>
>> >        </tr>
>> >      </table>
>> >          </td>
>> >          <td valign="top">
>> >      <div style="width:300px;overflow:auto;">
>> >      <table border="1" cellspacing="1" cellpadding="5">
>> >        <tr>
>> >          <td>
>> >            ID
>> >          </td>
>> >        </tr>
>> >        <tr>
>> >          <td>
>> > 
>> >
>>  AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
>> > 
>> >          </td>
>> >        </tr>
>> >        <tr>
>> >          <td>
>> > 
>> >
>>  BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
>> > 
>> >          </td>
>> >        </tr>
>> >        <tr>
>> >          <td>
>> > 
>> >
>>  CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
>> > 
>> >          </td>
>> >        </tr>
>> >      </table>
>> >      </div>
>> > 
>> >          </td>
>> >        </tr>
>> >      </table>
>> > 
>> > 
>> >  Off-hand, I can't think of a reasonably sane way to do this in html.
>> >  If dumping it into a spreadsheet is an option then you can freeze the
>> >  rows/cols.
>> > 
>> >  -Josh
>> > 
>> > > 
>> > >  Thanks
>> > >  Justin
>> > > 
>> > > 
>> > _______________________________________________
>> >  nflug mailing list
>> >  nflug at nflug.org
>> >  http://www.nflug.org/mailman/listinfo/nflug
>> 
>>
>>  _______________________________________________
>>  nflug mailing list
>>  nflug at nflug.org
>>  http://www.nflug.org/mailman/listinfo/nflug
>> 
>> 
>> 
>> 
>
_______________________________________________
nflug mailing list
nflug at nflug.org
http://www.nflug.org/mailman/listinfo/nflug



More information about the nflug mailing list