Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: format a number in javascript


Message #1 by "Myle" <myle.pham@n...> on Fri, 20 Oct 2000 18:18:33 +0100
Hi All,


My javascript array is MyArray[1][3] = 8000
I want it looks like this on the page 8,000.00
so I tried format it this way in the javascript:

document.write("<TD>");  document.write("<%=FormatNumber(CLng(");    document.write(MyArray[1][3]);
document.write("),2)%>");   document.write(" </TD>");

It did not work.

I replaced MyArray[1][3] with the actual number then it worked fine

document.write("<TD>");  document.write("<%=FormatNumber(CLng(8000),2)%>");   document.write(" </TD>");


What do I missed.


Thank you in advance.

Myle

  Return to Index