The Forum has been Updated
The code has been upgraded to the latest .NET core version. Please check instructions in the Community Announcements about migrating your account.
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)
نوشته شده در
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.
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
Doug G
======
Computer history and help at www.dougscode.com
نوشته شده در
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.
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.
نوشته شده در
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
Doug G
======
Computer history and help at www.dougscode.com
نوشته شده در
You could probably get a jquery dialog plugin that will accomplish what you want
نوشته شده در
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.
Email Member
Message Member
Post Moderation
بارگزاری فایل
If you're having problems uploading, try choosing a smaller image.
پیشنمایش مطلب
Send Topic
Loading...