Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Money Format

Status
Not open for further replies.

Kendel

Programmer
Apr 24, 2002
1,512
US
Hi,

Does anyone have a money format function that I can copy?

<input type=&quot;text&quot; onBlur=&quot;MoneyFormat()&quot;>

<script language=&quot;vbscript&quot;>
Sub MoneyFormat()
???
End Sub
</script>

Thanks

 
FormatCurrency(Expression[,NumDigitsAfterDecimal [,IncludeLeadingDigit [,UseParensForNegativeNumbers [,GroupDigits]]]])

Something in this neighborhood:

<form name=&quot;myForm&quot;>
<input type=&quot;text&quot; name=&quot;myTxtBox&quot; onBlur=&quot;MoneyFormat()&quot;>
</form>
<script language=&quot;vbscript&quot;>
Sub MoneyFormat()
myVar=formatcurrency(myForm.myTxtBox.value,2)
myForm.myTxtBox.value=myVar
End Sub
</script>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top