I have officially lost the three last strands of my hair and the scalp is starting to go, over this strange problem. I am trying to take a latitude in degrees, which is passed in a form and reduce the decimals to only 2 places for display.
Testing:
1) Check to make sure that the number from the form is passed to the function:
var lat2 = form1.lat2.value;
alert (lat2);
Works (i.e., 36.889 from form and that is displayed in the alert).
2) Try to reduce the decimals to two places:
var lat2 = form1.lat2.value;
alert (lat2.toFixed(2));
Fails, nothing is displayed. I am certain its an easy fix, I just don't know what to do.
Thanks... Ronnie
Testing:
1) Check to make sure that the number from the form is passed to the function:
var lat2 = form1.lat2.value;
alert (lat2);
Works (i.e., 36.889 from form and that is displayed in the alert).
2) Try to reduce the decimals to two places:
var lat2 = form1.lat2.value;
alert (lat2.toFixed(2));
Fails, nothing is displayed. I am certain its an easy fix, I just don't know what to do.
Thanks... Ronnie