should be simple but RegExs never seem to be :). Can anyone help on how to strip both a comma and any non-numeric characters from a string? Thanks. It's in the var result block. Apparently when you put an operator in the number it bombs out.num1 and num2. I also need to strip out any dashes.
function calcTotalRetailVal() {
var num1 = $oneTimeCostField.val();
var num2 = $recurringTotalCostField.val();
//In the replace method
var result = parseFloat(num1.replace(/,/g, '')) + parseFloat(num2.replace(/,/g, ''));
if (!isNaN(result)) {
$totalRetailAmountField.text('$' + result.toFixed(2));
}
}