Let me apologize for this simple question. I have done research and could only find a (MS)JScript function that does what I need.
What I need is a JavaScript function that simply formats a string (ie. 12.33333 to 12.33). I know I obviously must be looking in the wrong places. This is what I have (the toPrecision() function is a JScript only function, I think):
<script language="JavaScript">
function updateProgress(iCur, iTo){
var fPercentage = (iCur / iTo) * 100;
updateProgress = fPercentage.toPrecision(3);
}
</script>
Thanks in advance.
Matt Ulmer
What I need is a JavaScript function that simply formats a string (ie. 12.33333 to 12.33). I know I obviously must be looking in the wrong places. This is what I have (the toPrecision() function is a JScript only function, I think):
<script language="JavaScript">
function updateProgress(iCur, iTo){
var fPercentage = (iCur / iTo) * 100;
updateProgress = fPercentage.toPrecision(3);
}
</script>
Thanks in advance.
Matt Ulmer