<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> I''ve gleaned a lot of good advice from reading this group and I''m hoping for more enlightenment. I''ve just starting using prototype with tablesort.js, and I''ve can''t yet sort a checkbox column correctly.<br> <br> Is there already a methodology for doing this or do I need to create a "compare" function that will allow me to accomplish this?<br> Is it simply a matter of assigning values to checkboxes (0=unchecked, 1=checked) or is there a class declaration for a checkbox column that I''ve missed in the code?<br> <br> The state of each box is either checked or unchecked, and I''d like to select a checkbox for each row randomly and click on the column header to sort the column, grouping them together (checked followed by unchecked)..<br> <br> Any and all advice is sincerely appreciated.<br> <br> -- <br> Steve Downie<br> <font color="#ff3300">_____________________________________________</font><br> <font face="Helvetica, Arial, sans-serif"> <font color="#666666" face="Arial">Media Solutions from</font><br> </font><font face="Arial Narrow"><b>G U L F C O A S T D I G I T A L S Y S T E M S</b></font><br> <font face="Arial Narrow" size="4">Voice: (408) 777-0300 Fax: (408) 777-0301</font><br> <font face="Arial Narrow" size="3">Web: </font><a href="http://www.GCDSystems.com"><font face="Arial Narrow" size="3">http://www.GCDSystems.com</font></a><br> <font face="Arial Narrow" size="3"> Email: </font> <a href="Steve.Downie-EKe1Gt9gd2oxoycv7ERPSQ@public.gmane.org"><font face="Arial Narrow" size="3">Steve D O T Downie A T GCDSystems D O T c o m</font></a> <br> <br> --~--~---------~--~----~------------~-------~--~----~<br> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. <br> To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <br> To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <br> For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en <br> -~----------~----~----~----~------~----~------~--~---<br> </body> </html> <br>
Hey, I don''t see a checkbox-related sort type, but I''m unconvinced you can easily roll your own: it appears that TableSorter relies on cell''s inner text for comparison, not on the cell''s DOM, so you''d be hard-pressed to compare checked= attributes. Try asking your question on Tetlaw''s libs'' group: http://groups.google.com/group/dexagogo He''ll probably come up with a tailored answer. -- Christophe Porteneuve a.k.a. TDD "[They] did not know it was impossible, so they did it." --Mark Twain Email: tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Maybe a bit of a hack but you could regex the id of the checkbox out of the innerHTML and then perform a dom lookup. It wouldn''t be very quick though, and they''d all need unique ids. Gareth On 6/12/07, Christophe Porteneuve <tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org> wrote:> > > Hey, > > I don''t see a checkbox-related sort type, but I''m unconvinced you can > easily roll your own: it appears that TableSorter relies on cell''s inner > text for comparison, not on the cell''s DOM, so you''d be hard-pressed to > compare checked= attributes. > > Try asking your question on Tetlaw''s libs'' group: > > http://groups.google.com/group/dexagogo > > He''ll probably come up with a tailored answer. > > -- > Christophe Porteneuve a.k.a. TDD > "[They] did not know it was impossible, so they did it." --Mark Twain > Email: tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---