Re: <table type="rowsortable">

This is behavior, and better implemented in script.

The browser does not have enough information to sort.  Declarative markup is
doomed to be incomplete, compared to behavior that can be implemented in
script.

Better to import a script to perform sort in exactly the manner needed for
your application.  No need to bulk up the browser implementation.


On 4/4/07, Bruce Boughton <bruce@bruceboughton.me.uk> wrote:
>
>
> Jeff Schiller wrote:
> > On 4/4/07, Bruce Boughton <bruce@bruceboughton.me.uk> wrote:
> >>
> >>  So, while it may be beyond the scope of the UA to provide decent
> >> sorting
> >> for every conceivable data type, it *may* not be beyond the scope of
> >> HTML to
> >> define a protocol for delegating this sorting to a client side script.
> >>
> >>  Bruce Boughton
> >>
> >
> > How far is this from just using standard onclick handlers on the <th>
> > elements?
> In the simple case, not very far.  However, to properly implement
> sortable tables, you would not simply sort by a column when its header
> was clicked;  you'd provide indications in the UI of which column the
> table is currently sorted by and in which direction
> (ascending/descending).  I'm sure there are more complex sorting models
> too, such as sorting by multiple columns.  If we were going to include
> this in the HTML spec, I would expect the UA to take care of this UI
> stuff for datagrids (or sortable tables) not the web page author.
> Otherwise, you're right, there's not a lot of point.  It depends how far
> we take this.
>
> Bruce
>
>

Received on Thursday, 5 April 2007 01:56:26 UTC