0

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

Edited by wilko1995: n/a

2
Contributors
1
Reply
2
Views
5 Years
Discussion Span
Last Post by WaltP
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.