On Oct 5, 4:37 am, onmountain <[EMAIL PROTECTED]> wrote:
> Hi. I found an excellent demo on the mochikit site 
> athttp://www.mochikit.com/examples/sortable_tables/index.html
> However, when I copied the sortable_tables.js and then pasted in the
> example html table into my .kid file, I got an error at the
> mochi:format="str" in the headers below.

That's because kid needs valid xml, and the mochi: are prefixes are
an
xml namespace, and neeed a declaration to be valid

e.g.

>         <table id="sortable_table" class="datagrid" 
> xmlns:mochi="/any/thing/you/want">
>             <thead>
>                 <tr>
>                     <th mochi:format="str">Domain Name</th>
>                     <th mochi:format="isodate">Creation Date</th>
>                     <th mochi:format="isodate">Expiry Date</th>
>                     <th mochi:format="istr">Organization Name</th>
>                 </tr>
>             </thead>
>
> I was able to delete the mochi:format="str" and just make them <th>,
> and the sorting seems to be fine.

That's because by default, its sorts by string comparison, which
happens to be
correct for the data in the example table (iso dates are string
comparable). If
you have numbers or non iso dates, however, they would be sorted
inncorrectly.

HTH

--
Wavy Davy


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to