How to know the separator value in numeric field when user of different location uses different separator value. ie In India we use "," as thousand separator and "." as decimal values? In case of web application JavaScript validation fails in such cases. Please suggest field validation in JavaScript for this case.
Added:Since I missed part about Javascript, not sure my
suggestion will work, as in the case of a web application, that would be
the settings for the server - not the user. I thought Javascript was
suppose to automatically use the computer's settings. If you need to
know what it used, perhaps you could set a value and check. For example,
set a variable to 1 million and see how it is delimited. Or for a date,
do the same thing. Set a date object to Now, and determine the format.
Many posts are in forums all over the internet about javascript and problems with locale settings. I've seen a few useful answers, but all of them relate to specific javascript framework implementations. Please describe the specific tools you are using to create your javascript. Maybe a solution exists. -- Tom
Discuss This Question: 2  Replies