How to convert string to number if string contains $
I have a form importing data from a .fdf and has fields with $ in it. For example "Selling_Price" value pulls from .fdf file "$51,480.00" but this is not a number it is just a text string.
How do I convert this into a number of 51,480.00 for another field so I would be able to use 51,480.00 to add to another field with an actual number value?
Example
event.value = this.getField("Selling_Price").value + this.getField("Sales_Tax").value;
I have tried
//Convert String to Number
event.value = Number(getField("Selling_Price").value);
and I have tried
//Convert String to Number
event.value = Number(this.getField("Selling_Price").value);
How can I achieve this when the text field contains "$" in the field?
I am importing
