This code will replace the comma’s no problem, but will leave the $ for some reason… Is it set up wrong? Trying to replace the $ also.
function doValidate() {
var valid = true;
document.likeItemSearchForm.sup.value = document.likeItemSearchForm.sup.value.replace(/\$|,/g, "")
return valid;
}
Try this:
'asd$asd,asd,asd$,asd'.replace(/[\$,]/g,'');JSFIDDLE
-edit- fixed link