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
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
In IIS Manager, under the webite, right-click and select 'Properties'. Check that Execute Permissions are given to scripts.
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.
<Script language="VBScript">
<!--
MsgBox "Hello world"
-->
</Script>
This code should display the message box with the phrase Hello world in it.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
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 ?
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 ?
ASKER
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.
ASKER
Thanks to all who made suggestions!
-m
-m