Posted on August 17, 2008 by ubk
One of the most common tasks is to format a number for currency display- an integer followed by two decimals.
You may be tempted to use number rounding to first shift the number’s decimal places (via multiplication), round it, then shift the decimal back (via division) to pound the number into your hard earned dollar, though [...]
Filed under: Basic Scripts, Scripts, javascript | Tagged: decimal, digits, fixed, IE, javascript, NS, number, precision, significant, toFixed, toPrecision | Leave a Comment »
Posted on August 3, 2008 by ubk
With JavaScript, it is possible to execute some code after a specified time interval.
This is called timing events.
So it is like: if you want to execute a code 2 minutes later from the page load , you can do that with a simple trick and here the trick is given to us by “God of [...]
Filed under: Basic Scripts, Scripts, javascript | Tagged: clearTimeout, events, function call back, javascript, script timer, settimeout, timers, timing events | Leave a Comment »