|
-
Feb 15th, 2001, 01:40 PM
#1
Thread Starter
Hyperactive Member
Hi all, i am a pretty avid VB programmer and am trying to break into vbscript.. im trying a few tutorials but am having a problem with msgbox function..
when the page runs.. everything else loads, i just get this error message:
Permission denied: 'MsgBox'
why is permission denied, how do i get around this.
thanks in advance
[vbcode]
'*****************************
MsgBox "MCD :: [email protected]", vbInformation + vbOKOnly, "User"
'*****************************
[/vbcode]
-
Feb 15th, 2001, 02:55 PM
#2
Addicted Member
Are you using this on an ASP page?
I could be wrong about this but Im not sure the msgbox function is integrated in ASP.
It might be because ASP scripts are processed server side and then sent to client in HTML format and msgbox docent exist in HTML.
The ASP code couldnt just wait for a user response like vb does. Still thats my thoughts - anyone know for sure?
You could use the Javascript alert("hello") to accomplish some of the stuff you can with msgbox.
Alex
ASP, SQL, VB6, Java Script and dubious guitar playing skills.
-
Feb 15th, 2001, 03:08 PM
#3
Thread Starter
Hyperactive Member
TY
alexmac:
first, thanks for the reply.. the reason i was using msgbox in asp coding is because a tutorial on another site had it..so i was just trying it.. I am pretty sure it is possible, considering vbscript does have a msgbox function.. it does seem kinda silly though to have the browser wait for the user to transfer control back..
-matt
[vbcode]
'*****************************
MsgBox "MCD :: [email protected]", vbInformation + vbOKOnly, "User"
'*****************************
[/vbcode]
-
Feb 15th, 2001, 03:16 PM
#4
Addicted Member
Yes I take your point about vbscript having the msgbox function but it would make sense for ASP pages not to support it as the server processes a page and then sends it. There is no waiting around for a response.
Let me know if asp does support it through
Alex
ASP, SQL, VB6, Java Script and dubious guitar playing skills.
-
Feb 15th, 2001, 03:30 PM
#5
Conquistador
try declaring it as normal vbscript... i.e
<script language="vbscript">
MsgBox "hello"
</script>
Just a thought... I had problems with this too...
Oh well, Good Luck
-
Feb 15th, 2001, 03:46 PM
#6
Addicted Member
Cool that works. Sorry MetallicaD thought you were trying to do this in ASP from the error message.
Alex
ASP, SQL, VB6, Java Script and dubious guitar playing skills.
-
Feb 16th, 2001, 12:27 PM
#7
2 things. using MSgBx will not work in ASP because it would only show up on the server if it did.
da_silvy's example will not work in netscape
-
Feb 21st, 2001, 06:40 AM
#8
Conquistador
but it will work in IE though?
-
Feb 21st, 2001, 09:36 AM
#9
Black Cat
Begin Useless Info
The MsgBox can't work on a server because the web server is running in the context of something like System or Anonymous Web User and doesn't actually have a desktop to display the MsgBox to.
End Useless Info
It should work on client side VBscript in IE because it's the VBScript equivalent to Javascript's alert.
Josh
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Feb 21st, 2001, 09:41 AM
#10
Frenzied Member
I realise that you are just donig a few tutorials but...
Personally I think you should use Javascript on the client side so your pages are accesable to more people.
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
|