• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 370
  • Last Modified:

MsgBox Permission denied

Why do I get the following error when I try to put a message box in an ASP?  Is there a way to avoid this? ie -
MyVar = MsgBox("Do you want to delete this message?", 49, "Delete Prompt")

Microsoft VBScript runtime error '800a0046'
Permission denied: 'MsgBox'
0
donb1
Asked:
donb1
  • 2
1 Solution
 
PepsterCommented:
You are trying to get the server to display a msgbox to the client which is impossible.

Try calling a server function which returns a value to the client and then rom the client side script display a messagebox.
0
 
donb1Author Commented:
I see your point, thanks
0
 
deepakstyagiCommented:
if u will try the following code it will work fine

<script language=vbscript runat=server>
msgbox "display"
</script>
0
 
deepakstyagiCommented:
You have to run ur script of msgbox on server thats why ur code  in <%%> doesn't work
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now