You have to explicitly convert the string to a float. There are more than onewayto do this but a good one is:v_value = new Float(s_value).getValue(); // (instead of v_value = s_value;).