|
-
Aug 13th, 2002, 03:06 AM
#1
Thread Starter
Frenzied Member
Message box in ASP
Is it possible to make a message box using ASP? I have tried to use the same syntax as in VB but it doesn't work.
Code:
MsgBox "This is a test", vbOKOnly + vbInformation, "Test"
-
Aug 13th, 2002, 03:20 AM
#2
Lively Member
Yes you can display a message like this :
<script language="vbscript">
sub fn1()
msgbox ("<%response.write("your message")%>")
end sub
</script>
And you have to call this function when you want to display the message
if you want to display okcancel buttons or so like in vb just assign it to a variable as in vb.
dim msg
msg=msgbox ("<%response.write("your message")%>", vbokcancel)
Last edited by kirankumar; Aug 13th, 2002 at 03:32 AM.
Your attitude determines your altitude!!!
-
Aug 13th, 2002, 04:06 AM
#3
Fanatic Member
You cannot use msgbox on client in ASP as ASP is server-side technology. If you use a msgbox it will display on the server and halt all executition until it is cleared.
You can use a client side msgbox, as kirankumar has described.
-
Aug 13th, 2002, 04:23 AM
#4
Hyperactive Member
If you use a msgbox it will display on the server and halt all executition until it is cleared.
This wouldnt happen, you would just get an error message :
Microsoft VBScript runtime error '800a0046'
Permission denied: 'msgbox'
blah blah blah...
--
Anglo Saxon
-
Aug 13th, 2002, 08:34 AM
#5
Fanatic Member
You can change the permissions though so it does occur.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|