Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 MsgBox woes
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 22 August 2015 :  21:45:08  Show Profile  Reply with Quote
I want a message box to display the file title (in strTitle variable) as the title of the message box, display the question icon to the left, and have three buttons (yes, no, cancel) ... but it doesn't even appear. What am I missing?


	intDel = MsgBox("Delete file also?",35, strTitle)

Doug G
Support Moderator

USA
6493 Posts

Posted - 22 August 2015 :  23:24:05  Show Profile  Reply with Quote
Are you trying to do this code in a web page using script in the browser source? If so, the browser would need to support vbscript. If you run this code as asp code, the msgbox would try to appear on the server console.

If you're just using vbscript unrelated to snitz/asp, there may be security settings on your computer blocking running .vbs files. Also, according to https://msdn.microsoft.com/en-us/library/aa445082%28v=vs.60%29.aspx , the code for yes/no/cancel is 3, not 35. I didn't see 35 in the list of format codes.

======
Doug G
======
Computer history and help at www.dougscode.com
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 22 August 2015 :  23:53:08  Show Profile  Reply with Quote
35 includes several different things. You total the values you want to incorporate, in this case 3 for the buttons (yes no cancel) and 32 to give the icon question mark.

But I finally realized the issue. ASP doesn't support msgbox function, even though I want to run it from the server ON the server. So, back to the drawing board. Javascript doesn't allow me to choose from three options anywhere I can discover. The Javascript Confirm leaves the variable in JS and isn't accessible to the program afterward. Guess I'll be stuck creating another icon, etc.; for the user to click. Not ideal.
Go to Top of Page

Doug G
Support Moderator

USA
6493 Posts

Posted - 23 August 2015 :  18:39:08  Show Profile  Reply with Quote
Thanks for the update. I haven't used asp/vbscript in years, but now that you mention it I do seem to recall the function is not available in asp.

======
Doug G
======
Computer history and help at www.dougscode.com
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 24 August 2015 :  04:12:13  Show Profile  Visit HuwR's Homepage  Reply with Quote
You could probably get a jquery dialog plugin that will accomplish what you want
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 24 August 2015 :  10:01:23  Show Profile  Reply with Quote
Solved it another way just using VBScript and ASP. Looked at some JQ examples and tried to incorporate one I thought might work, but I obviously don't know the stuff well enough to use it.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.1 seconds. Powered By: Snitz Forums 2000 Version 3.4.07