Wow, this is pretty cool. This javascript function was just what the Dr. ordered for a recent script I wrote where I wanted to use the sprintf function in javascript: http://www.vladdy.net/Demos/printf.html Give it a try. You can use my string to test it: printf(‘%.02f’,42);