I have a form that sends money value e.g
<input type="text" name="amount" value="N50,000.00 NGN" />
<input type="button" value="submit">
I want to remove all characters in the amount field leaving only the numbers in this format;
<input type="text" name="amount" value="50000" />
<input type="button" value="submit">
what is the best method to do this with javascript?
first think you want to do is to strip the string or value from numbers using something like this
here is a working example
http://jsfiddle.net/C69u4/