Is there a JavaScript equivalent to "dollarformat()"? I have a calculation
script which updates a text box, and would like the output ("thetotal")
formatted.

function figurethis() {
var thetotal=0
var num=1;
        for (num=1; num<=#get.recordcount#; num++) {
                var thisfield = 'prod' + num + 'qty';
                var thisprice = 'prod' + num + 'price';
                var theamount = document.entries.eval(thisfield).value;
                var theprice = document.entries.eval(thisprice).value;
                thetotal = thetotal + (theamount * theprice);
        }
document.calculatethis.result.value = thetotal;
}

TIA!!
D

*************
Diana Nichols
Webmistress
http://www.lavenderthreads.com
770.434.7374

"One man's magic is another man's engineering." ---Lazarus Long


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to