Forum Moderators: open

Message Too Old, No Replies

Running one table over another in DW

Can this be done?

         

limbo

12:01 pm on Oct 14, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There is a very useful tool in MS Excel where large sections of tabulated data can have the title rows 'frozen' so the subsequent rows below appear to run underneath as you scroll down.

Is there a way to manipulate tables in this way using DW or javacript?

All advice welcome

Ta

Sinner_G

12:18 pm on Oct 14, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



First thing that comes to my mind is a frameset, where you you have the 'frozen' rows in the upper frame and the rest in the bottom frame.

Grumpus

12:19 pm on Oct 14, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm not sure how the thing you're talking about works in Frontpage - that program scares me, but I won't go into that here.

You could achieve what you're looking for by using frames - probably an <IFRAME> would serve you best. Run a search for <IFRAME> and you'll see how it works. The main page gets the header and the framed page gets the data.

G.

limbo

12:36 pm on Oct 14, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks,

I had thought about using frames also but we irk on the side of a nonframed site. But adaptable as we have to be I would consider it if i could get the right results.

I have 60 tables to format. Could I implement different framsets for each table? within a non framed site so when a user clicks the back button or links to a non framed area the frames would dissapear?

In short only have frames present when a table page is open.

Ta
--------------------------------------------
Grumpus, I see what you mean with the Iframes now - I think this will work just how Imagined.
thanks.

Purple Martin

10:56 pm on Oct 14, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You could also try putting the table in an absolutely-positioned-and-sized div, and play with the overflow attribute of the div to make it scroll the way you want. Position your column headings in their own absolutely-positioned divs sitting just above the top, and bingo.

moonbiter

2:23 pm on Oct 15, 2002 (gmt 0)

10+ Year Member



There is a very useful tool in MS Excel where large sections of tabulated data can have the title rows 'frozen' so the subsequent rows below appear to run underneath as you scroll down.

Theoretically speaking, that is the ratonale behind the thead and tfoot [w3.org] elements in HTML. I don't know of any browser that supports it, though.

Purple Martin's idea is what I would go with.

Sinner_G

2:39 pm on Oct 15, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't know of any browser that supports it, though.

I was told NS 6 supported those tags, but did not check myself.

<edit> Thinking about it, were those tags not just for repetition of footer and header when printing?</edit>

moonbiter

2:55 pm on Oct 15, 2002 (gmt 0)

10+ Year Member



I was told NS 6 supported those tags, but did not check myself.

You're right, it works:

<table>
<thead>
<tr><th>head 1</th><th>head 2</th></tr>
</thead>
<tbody style="height: 200px; overflow: auto;">
<tr><td>column 1</td><td>column 2</td></tr>
[... repeat a lot of times ...]
<tr><td>column 1</td><td>column 2</td></tr>
</tbody>
</table>

Cool.

Thinking about it, were those tags not just for repetition of footer and header when printing?

Nope. From the specification [w3.org]: "This division enables user agents to support scrolling of table bodies independently of the table head and foot. When long tables are printed, the table head and foot information may be repeated on each page that contains table data." [emphasis mine].

Sinner_G

3:03 pm on Oct 15, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Just tried it on:

IE 6.0 Nope
NS 7.0 Yup
NS 4.72 Nope
Opera 6.05 Nope

So, how many of your users are there on a NS 6 or 7? :)