Hi all,

i need help with this code.

<html>
<head>
<SCRIPT LANGUAGE="VBScript"> 
<!--
Sub button_OnClick
  Dim TheForm
  Dim y
  Set TheForm = Document.form1
  If IsNumeric(TheForm.inputbox.Value) Then
    If TheForm.inputbox.Value >= 1 Then
      y = TheForm.inputbox.Value * 1.3
	  Alert("Your $AUD is $" & y)
    End If
  Else
    Alert("Please enter a numeric value.")
  End If
End Sub
-->
</SCRIPT>

</head>
<body>
<form name="form1">
	<input type="text" name="inputbox">
	<input type="button" value="convert" name="button">
</form>
</body>
</html>

How would i get it so when i enter a number and it gets converted, it comes back in $ format? eg if i enter 1, it comes back $1.3 but how would i get it to be $1.30 without just adding 0 on the end?

Thanks Wilko

Look up the FORMAT function.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.