I have a drop down box with values similar to this:
"Railroad Bridge - Johnson Village - $45"
I am needing to perform calculations based on the price of this trip, therefore I would like to extract only the '45' portion of this string and use it in my calculations. All of the values for the drop down box are going to vary in length but will all have the numeric value at the end, so I just don't know how to grab the last 2 - 3 characters and make js see them as a number. I've tried variations of the 'index of' function and couldn't figure it out.
Suggestions?
Thank you!
~ lahddah
"Railroad Bridge - Johnson Village - $45"
I am needing to perform calculations based on the price of this trip, therefore I would like to extract only the '45' portion of this string and use it in my calculations. All of the values for the drop down box are going to vary in length but will all have the numeric value at the end, so I just don't know how to grab the last 2 - 3 characters and make js see them as a number. I've tried variations of the 'index of' function and couldn't figure it out.
Suggestions?
Thank you!
~ lahddah