Displaying a Message Box
Written by Eric Smith, Northstar Computer Systems LLC
During debugging, it’s helpful to be able to print out values as the page is executing. I frequently do this with Response.Write statements; however, you can also do it with client-side Javascript to create message boxes. Here’s the code you need to add to your ASP to pop a message box:
‘ rest of ASP code goes here
%>
<SCRIPT LANGUAGE=”Javascript”>
alert(“<% = strMessageToShow %>”)
</SCRIPT>
<%
‘ rest of ASP code goes here
However, remember that you can't use the VBScript MsgBox function in server-side code. It won't even show the message box on the server, so avoid its use.
Keywords: [
Uncategorized ASP Tips
]
Publication Date: 2/10/2001
|