Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding Percentages/Stripping Numeric values

Status
Not open for further replies.

ronaldo7

Programmer
Jun 24, 2004
3
GB
I have several question banks created using the pre-built question banks.

I wish to compile the results so need to add them as numbers but they are outputted as percentages is there a way of stripping the numeric values out of these strings?

I am not an expert in flash so any help would be gratefully received

 
You can use parseFloat or parseInt to remove the numeric value:

Code:
trace(parseFloat('14.5%'))
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top