Link to home
Start Free TrialLog in
Avatar of mudface061200
mudface061200

asked on

Permission denied: 'MsgBox'?

I am wanting to use MsgBoxes on my site (written in VBScript).

Using both:
Call MsgBox("Hello World") and MsgBox "Hello World" produces the following error:

Microsoft VBScript runtime error '800a0046'

Permission denied: 'MsgBox'

Is there a setting or something I would need to make to get rid of this Permission denied error?
Any suggestions is greatly appreciated.  Thanks
-m
Avatar of peteyhiggins
peteyhiggins

In IIS Manager, under the webite, right-click and select 'Properties'.  Check that Execute Permissions are given to scripts.
Avatar of mudface061200

ASKER

Execute Permissions were already given to scripts.
The methods you posted should work fine, nay be theres some thing wrong with the IIS configuration.

<Script language="VBScript">
<!--
MsgBox "Hello world"
-->
</Script>

This code should display the message box with the phrase Hello world in it.
ASKER CERTIFIED SOLUTION
Avatar of Anthony Perkins
Anthony Perkins
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
you cannot use VB's msgbox. You have to use javascript's alert messages.
MsgBox() is available for server-side VBScript. MsgBox() is not available on the client.
I use msgbox on client side all the time and I don't have trouble.

Just another thought, what's setting on your IE.
etmendz - wrong way around..

Server side you cannot use msgbox (because it's executed on the server!). You can only use it client side like:

<HTML>
<HEAD>
<SCRIPT language="vbscript">
msgbox "Hello world"
</SCRIPT>
</HEAD>
</HTML>
The question is, what do you want to accomplish ?
I need to pop up an alert if 3 options are not chosen.  I suppose I could do it with JavaScript, I just thought there is some way to pop a window up on the client in VBScript..
I would recomend to do it with JavaScript, you have more control on the form elements.
Thanks to all who made suggestions!

-m