Thanks Arnar. That got rid of the error message. I'm still working on
the non sorting column thing...I will post the code if I get it
figured out.

-Scott.

On Feb 12, 11:15 am, "Arnar Birgisson" <[EMAIL PROTECTED]> wrote:
> Hi there Dr. Big Fresh (I assume that's not your real name),
>
> On 2/12/07, drbigfresh <[EMAIL PROTECTED]> wrote:
>
>
>
> > I've been playing around with some of the examples, especially the
> > sortable_tables example, and I can't figure a couple of things out:
>
> > 1) If I include the sortable_tables.js file in my site's template file
> > (which means it gets included on every page regardless of whether it
> > is being used), I get an error on any page that does not contain a
> > sortable table... Is there anyway to stop the error?
>
> Change this line
> sortableManager.initWithTable('sortable_table');
>
> to something like this:
> if ($('sortable_table')) {
>     sortableManager.initWithTable('sortable_table');
>
> }
> > 2) Is there anyway to stop a column from being sortable? Since some of
> > my tables have columns which you can't sort on, I would love to just
> > have the table header cell for those columns be normal....
>
> To do this properly you need to change serveral places I think. Mark
> the column header with something like an "mochi:nosort" attribute and
> store that info in this.columns[i].nonsortable (see lines 67-79). Then
> for those columns skip over lines 91-107 and just push a null onto
> rowData (line 107).
>
> The last thing is to look at the loop that starts on line 156 - and
> probably skip it alltogether for non-sortable columns. Just add "if
> (col.nonsortable) continue;" after line 157.
>
> Haven't tried any of this myself though..
>
> > Thanks. The MochiKit rocks, and I can't wait to get some more time
> > with it....
>
> :o)
>
> Arnar


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to