Hi Mummi,

There's nothing in HTML/CSS so you'd have to write your own javascript function 
to add the commas, a la...

function addCommas(nStr)
{
        nStr += '';
        x = nStr.split('.');
        x1 = x[0];
        x2 = x.length > 1 ? '.' + x[1] : '';
        var rgx = /(\d+)(\d{3})/;
        while (rgx.test(x1)) {
                x1 = x1.replace(rgx, '$1' + ',' + '$2');
        }
        return x1 + x2;
}
(NB not my code but stolen from somewhere on the web)

Hope that helps

N


> To: [email protected]
> Subject: Number formats in Exhibit 
> Date: Thu, 24 Jan 2008 10:45:13 +0000
> From: [EMAIL PROTECTED]
> 
> Quick question about numbers in Exhibit: I have some fields in my  
> JSON data with numbers in them and would like to both sort & filter  
> on them like numbers, and also format them with thousand-separators  
> (e.g. 100,000) for readability. I can achieve the latter by  
> preformatting the numbers before creating my JSON, but then they'll  
> be treated as text by Exhibit I presume. Is there a CSS style for  
> formatting numbers in this fashion, or something built into Exhibit?
> 
> 
>            Mummi
> 
> -----------------------------------------------------------
> Gudmundur A. Thorisson, PhD student, Brookes lab
> E-mail: [EMAIL PROTECTED]
> Location: Adrian building, room G11
> 
> 
> _______________________________________________
> General mailing list
> [email protected]
> http://simile.mit.edu/mailman/listinfo/general

_________________________________________________________________
Get Hotmail on your mobile, text MSN to 63463!
http://mobile.uk.msn.com/pc/mail.aspx
_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general

Reply via email to