MsgBox woes - Posted (1403 Views)
Advanced Member
Carefree
Posts: 4224
4224
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?
Code:

	intDel = MsgBox("Delete file also?",35, strTitle)
 Sort direction, for dates DESC means newest first  
 Page size 
Posted
Support Moderator
Doug G
Posts: 6493
6493
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
Posted
Advanced Member
Carefree
Posts: 4224
4224
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.
Posted
Support Moderator
Doug G
Posts: 6493
6493
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
Posted
Forum Admin
HuwR
Posts: 20611
20611
You could probably get a jquery dialog plugin that will accomplish what you want
Posted
Advanced Member
Carefree
Posts: 4224
4224
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.
 
You Must enter a message