[jQuery] Re: sorting values with commas with tablesorter 2.0

2008-01-24 Thread Leanan
I know a while back I was trying to sort percentages and they weren't working. That's because the percentages I had to sort were of the format xx.yy%. The parser for percent in tableSorter only handled them if they were of the format xx%. I ended up modifying the parser for percent to handle xx

[jQuery] Re: sorting values with commas with tablesorter 2.0

2008-01-24 Thread Chris
Or simply function (s) { return s.replace(/,/g, ""); } On Jan 24, 1:16 pm, Bhaarat Sharma <[EMAIL PROTECTED]> wrote: > got it > > for anyone ahving same trouble.. > > format: function(s) { > while (s.indexOf(",")>0) > s = s.substring(0,s.indexOf(","))

[jQuery] Re: sorting values with commas with tablesorter 2.0

2008-01-24 Thread Bhaarat Sharma
got it for anyone ahving same trouble.. format: function(s) { while (s.indexOf(",")>0) s = s.substring(0,s.indexOf(",")) +s.substring(s.indexOf(",")+1,s.length); return s; }, On Jan 24, 12:04 pm, Bhaarat Sharma <[EMAIL PROTECTED]> wrot

[jQuery] Re: sorting values with commas with tablesorter 2.0

2008-01-24 Thread Bhaarat Sharma
noticed i had   before the data inside the tags. but still not able to sort number with commas. like 1642 as 1,642 thanks! On Jan 24, 11:51 am, Bhaarat Sharma <[EMAIL PROTECTED]> wrote: > now i notice that even simple numbers are not sorted correctly. > > i am displaying these numbers from a s

[jQuery] Re: sorting values with commas with tablesorter 2.0

2008-01-24 Thread Bhaarat Sharma
now i notice that even simple numbers are not sorted correctly. i am displaying these numbers from a scriplet <%=object.displayLong() %> do i need to be converting this to a string or tableSorter to work correctly. only data that is in a percentage is being displayed property. like 00.01% and 00

[jQuery] Re: sorting values with commas with tablesorter 2.0

2008-01-24 Thread Bhaarat Sharma
anything? this data is directly in a th header. 3,567 and isnt sorting properly. would appreciate some tips On Jan 23, 5:20 pm, Bhaarat Sharma <[EMAIL PROTECTED]> wrote: > Hi > > I have some number which have commos in them.  How can i sort these > propertly? > > for example 3567 is as 3,567