I have text boxes that take in numbers. My problem is when i add decimals, my remainder doesn't return a "0" in front on my number on single digit remainders.code:main code, return the decimal of the number. (i.e 01,02,13,14, etc) The decimal is manually handled else where in the code.
Math.round(getRemainder(hour / 100))
function getRemainder(val){ return parseFloat((val - parseInt(val))*100); }
1/8/2010 4:08:22 PM
why are you returning a float if you're rounding?
1/8/2010 4:30:56 PM
left it in there, was ParseInt. (i did not write this code)Pretty much in my getRemainder function, if i multiply by 100, i'm losing my zero.I'm just going to convert it a string, strip the decimal, and return it as a string. Take out all the round BS because its not going to work.
1/8/2010 4:39:42 PM
Whats the big picture that you are trying to do rather than just posting your/someone else's solution. That might yield better responses/help.
1/8/2010 4:41:54 PM
i've got it now. Thanks,
1/8/2010 4:50:27 PM
np
1/8/2010 5:13:10 PM
1/8/2010 5:23:55 PM