If you need a number greater than 999,999.00 you will have a problem.
These are only good for numbers less than 1 million, 1,000,000.
They only remove 1 or 2 commas.
Here the script that can remove up to 12 commas:
function uncomma(x) {
var string1 = x;
for (y = 0; y < 12; y++) {
string1 = string1.replace(/\,/g, '');
}
return string1;
}
Modify that for loop if you need bigger numbers.