Remove commas (,) from user entered numbers into a field
Hi everyone,
How can I filter out commas from a number entered by a user into a input text field? I am trying to do calculations with those numbers entered, but if the user enters a comma, i get "NaN" (not a number) as the result of what the user entered.
I could restrict the user from entering commas into the fields (I am already restriciting entering letters and periods), but it would be nice if the user can still use commas.
the code I have so far is:
q4input = q4_mc.q4_ans.text;
q4_preCalc = (Number(q4input)*1000);
trace(q4_preCalc);
thank you for your help in advance.
Rafael.