Dialog Boxes in VBScript


Select

<HEAD>

<SCRIPT LANGUAGE="VBScript">
<!--
Sub btnMsgBox_onClick
	MsgBox "Question ?", vbOK - vbCancel, "This is a MsgBox"
End Sub

Sub btnInputBox_onClick
	InputBox "Question ?", "This is an InputBox"
End Sub

Sub btnPromptBox_onClick
	alert Prompt ("Type something please", "Nothing was entered")
End Sub

Sub btnConfirmBox_onClick
	If Confirm ("OK ?") = TRUE Then
		MsgBox "You clicked OK"
	Else
		MsgBox "You clicked Cancel"
	End If
End Sub

Sub btnAlertBox_onClick
	alert ("This is an alert message")
End Sub
-->
</SCRIPT>

</HEAD>

<BODY>

<FORM NAME="contents"><B>Select</B>
	<INPUT TYPE="button" NAME="btnMsgBox" VALUE="MsgBox">
	<INPUT TYPE="button" NAME="btnInputBox" VALUE="InputBox">
	<INPUT TYPE="button" NAME="btnPromptBox" VALUE="PromptBox">
	<INPUT TYPE="button" NAME="btnConfirmBox" VALUE="ConfirmBox">
	<INPUT TYPE="button" NAME="btnAlertBox" VALUE="Alert">
</FORM>