views:

55

answers:

2

I am having an issue with a slider (implemented using Prototype) and IE7. Upon the slider value change I update a with the value such as "420,000".

Now on all browsers other than IE7 this is display correctly. But on IE7 it is displayed as "420.000" ..

my question is how did the "," become "."

the page has UTF-8 meta tag.

Any help?

+1  A: 

Use the toLocaleString() method of Numbers instead of hard-coding a locale so the user's own locale is used.

Eli Grey
tried using that but then I loose the "comma" formatting
John Stewart
Is that correct for your locale though?
Eli Grey
+2  A: 

Are you testing IE7 on a different machine or a VM? (I'm assuming so since getting multiple versions of IE on the same machine is practically impossible). It's possible that machine is set to a different locale. It's common in some European countries (not sure which ones) to use "." as the thousands separator, and "," as the decimal.

If this is the case, consider this a good test of how your software might behave for European visitors to your site.

Kip
I am using a machine with US locale.. still the same issue... :(
John Stewart
@JohnStewart: so on the IE7 machine, you checked Control Panel/Regional and Language Options, and the "Number" sample shows "123,456,789.00" and NOT "123.456.789,00" ?
Kip