Hi,
I have another noob javascript question, sorry to be a pain!
I have a simple html table. Each row contains a text box where the user enters some percentages. The percentages must add up to 100%.
I have some validation code to ensure that only numbers are entered in the text boxes. What I would like to know is:
1) If a user in Europe enters a decimal like this 25,2 (for 25.2%) can JavaScripts IsNan able to tell what the locale is and verify that this is a valid number?
2) I have some code that adds up the numbers so that they equal 100%. Can JavaScript take account of the numbers locale and add numbers like 25,2 and 10 ?
Is it easier just to ensure that a user enters numbers such as 25.2 10 etc to make things easier?
Thanks,
MrPeds
I have another noob javascript question, sorry to be a pain!
I have a simple html table. Each row contains a text box where the user enters some percentages. The percentages must add up to 100%.
I have some validation code to ensure that only numbers are entered in the text boxes. What I would like to know is:
1) If a user in Europe enters a decimal like this 25,2 (for 25.2%) can JavaScripts IsNan able to tell what the locale is and verify that this is a valid number?
2) I have some code that adds up the numbers so that they equal 100%. Can JavaScript take account of the numbers locale and add numbers like 25,2 and 10 ?
Is it easier just to ensure that a user enters numbers such as 25.2 10 etc to make things easier?
Thanks,
MrPeds