table sorting. header and body in different tables

A

Amy

for some reasons, i am using two tables. one for the header, one for
the body content.
has anyone done table sorting in this situation?

anyone has a good script for this?

thanks
 
A

Amy

will this script still work if i put divs ?

<div>
<table>
<thead>
....
</table>

<div style="height:150px; overflow:auto;">
<table>
<tbody>
....
</table>
</div>

</div>

the reason i m doing this is so that the table header do not scroll
when the table list is getting too long in the div and scrollbar
appear.

any clues? any suggestion to better approach on this issue?

thanks
 
R

RobG

Amy said:
will this script still work if i put divs ?

Please don't top-post here, reply below trimmed quotes. Matt's reply
has a link to his javascript toolbox which has a useful table sorting
script. I'm sure you could modify it to sort the second 'body' table
based on clicks on the first 'header' table.
 
Y

Yanick

Amy a écrit :
will this script still work if i put divs ?

Well, no because first of all your <div> tag overlap your <tbody> and
<table> tags. In other words, all tags must begin and end in the same
parent tag ; you cannot begin and end a tag in different parents :

Is illegal :

<div>
<span>
<div>
<span>
</span>
</span>
</div>
</div>

Implementing scrolling tables are not as easy as it sounds. I've
personnally search a long time for a good implementation of such
component but didn't find anything really useful, except this one that
uses jquery (http://makoomba.altervista.org/grid/).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top