13 replies
by hclarius
How about simple javaacript
alert("Hello")
by bowjangles
by peyison
The code you write for ASP is server side - that is, it is read and processed by the server. Once the ASP is processed by the server, the HTML generated is returned to the client (the browser). So by the time the browser gets the page, all of the ASP code has already been processed.
Msgbox is a client side command. It needs to be in the page that is processed by the browser (after all of the ASP has been processed). The server doesn't know what to do with Msgbox. You could use client side VBScript to call Msgbox, but you are probably better off using JavaScript for client side code, since more browsers understand JavaScript than VBScript. The JavaScript command is alert().
Hope this helps.
by roc180
Just a side note if you are using VBscript
alert("Some text")
will also work
Good Luck
Neal Martinelli
by juanja
I am sure you have been using ASP and VBScript for some time now. The answer is simple. When you write something like this:
<% msgbox("Alert") %>
Where do you think the script is trying to display the message box? in the user's monitor? WRONG,it tries to display it in the server's monitor, so you will get a "Permission Denied" because the script is executed in the server.
On the other hand, if you try something like this:
<% for a=1 to 2 %>
by rsv
Hi,
The ASP file will be executed on the server.
The code you write for ASP is server side - that is, it is read and processed by the server. Once the ASP is processed by the server, the HTML text stream generated is returned to the client (the browser). So by the time the browser gets the page, all of the ASP code has already been processed.
Msgbox is a client side command. It needs to be in the page that is processed by the browser (after all of the ASP has been processed). The server doesn't know what to do with Msgbox. You could use client side VBScript to call Msgbox, but you are probably better off using JavaScript for client side code, since more browsers understand JavaScript than VBScript. The JavaScript command is alert().
Maybe this will help you.
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending