david7777777777
Programmer
How, exactly, do I code a MsgBox on my ASP page? I want it to appear when the btnUpdate button is clicked on my page. Thanks.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
MsgBox("Some Message Here")
<%@ Language=VBScript %>
<% Option Explicit %>
<% Response.Buffer = True %>
<html>
<head>
<script Language="JavaScript">
<!--
function checkForm() {
if(document.form1.first.value == "") {
window.alert("Please provide a first name.")
return false
}
if(document.form1.last.value == "") {
window.alert("Please provide a last name.")
return false
}
if(window.confirm("Are you sure you want to submit ??")) {
return true
} else {
return false
}
}
//-->
</script>
</head>
<body>
<form name="form1" action="test2.asp" onSubmit="return checkForm();">
First Name: <input type="text" name="first"><br>
Last Name: <input type="last" name="last"><br>
<input type="submit" value="Submit">
</form>
</body>
</html>
<%@ Language=VBScript %>
<% Option Explicit %>
<% Response.Buffer = True %>
<html>
<head>
</head>
<body>
This is the information you submitted.<br>
<b>First Name: </b><%=Request.Form("first")%><br>
<b>Last Name: </b><%=Request.Form("last")%>
</body>
</html>