• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Sort table Ajax/Javascript

 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hmm.. excellent coincidence, I am working on a problem which involves JS and we have got activity right over here this week

Now, We are using a out-of-a box java based CMS. Now it has a search feature in which it uses a custom tag <grid...> to render the results.

Now, we have a requirement that we have to sort the results at client side (the s/w already provides sorting while submitting search query)

So basically, the problem boils down to (i hope)how can i sort the table without actually making any code additions/modification to the table tag. The table has an id, thead and a tbody consisting of many rows.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not sure if you can get away without making any changes to the table HTML, but an example of client-side table sorting can be found here.
 
Ranch Hand
Posts: 1211
Mac IntelliJ IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I highly recommend Sortable table by Erik Arvidsson.
It works, and the code is very well written, making it a snap to customize it, which You are free to do since it is licensed under ASL.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
to sherrif dittmer
i've been to the link you suggested and like that table sort
but i can't find the code for it...its called tablesort.js
I've registered on their site, and looked all around , but can't figure out how to get the .js from their demo...
frustrated a bit.
Can you help?
many thanks.
bc
ah..i think i found it...and found that congrats are in order for your 10k
[ September 29, 2007: Message edited by: bc basslet ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic