InternetUnicodeHTMLCSSScalable Vector Graphics (SVG)Extensible Markup Language (xml)ASP.NetDocument Object Model (DOM)JavaScript Server-Side VBScriptVBScript Basic ElementVBScript OperatorVBScript Statement VBScript FunctionString FunctionMath FunctionArray FunctionDate/Time FunctionData Type FunctionEngine Function Draft for Information Only
ContentVBScript Misc Functions
VBScript Misc FunctionsFunctions for manipulating misc operation. However all modern browser does not support VBScript InputBox and MsgBox functions directly.
InputBox FunctionCreate and display a standard input dialog box with a text box and a given prompt in the dialog box according to the specified title, default, xpos, ypos, helpfile and context arguments. The dialog box will wait for the user to input text or click a button to continue. SyntaxInputBox(prompt[, title][, default][, xpos][, ypos][, helpfile, context]) ArgumentpromptRequired. String expression displayed as the message in the dialog box. The maximum length of prompt is approximately 1024 characters, depending on the width of the characters used. If prompt consists of more than one line, you can separate the lines using a carriage return character (Chr(13)), a linefeed character (Chr(10)), or carriage return–linefeed character combination (Chr(13)&Chr(10)) between each line.titleOptional. String expression displayed in the title bar of the dialog box. If you omit title, the application name is placed in the title bar.defaultOptional. String expression displayed in the text box as the default response if no other input is provided. If you omit default, the text box is displayed empty.xposOptional. Numeric expression that specifies, in twips, the horizontal distance of the left edge of the dialog box from the left edge of the screen. If xpos is omitted, the dialog box is horizontally centered.yposOptional. Numeric expression that specifies, in twips, the vertical distance of the upper edge of the dialog box from the top of the screen. If ypos is omitted, the dialog box is vertically positioned approximately one-third of the way down the screen.helpfileOptional. String expression that identifies the Help file to use to provide context-sensitive Help for the dialog box. If helpfile is provided, context must also be provided.contextOptional. Numeric expression that identifies the Help context number assigned by the Help author to the appropriate Help topic. If context is provided, helpfile must also be provided.ReturnReturns a Variant of the String data subtype containing the contents of the text box obtained from input dialog box entered by the user.Remark
ReqVersion1ExamplesAlthough all modern browser does not support VBScript InputBox and MsgBox functions directly, VBScript can still be tested using Microsoft Internet Explorer 11 after adding '<meta http-equiv="x-ua-compatible" content="IE=10">' to HEAD tag. Both client side VBScript InputBox and MsgBox functions can be used in server side indirectly through creating a client side Script on the fly to run a ?document.write?. Ref.:https://msdn.microsoft.com/library/dn384057(v=vs.85).aspx https://msdn.microsoft.com/en-us/library/windows/apps/Hh700404.aspx Examples of InputBox function Ref.: HTML Document Input:
MsgBox FunctionCreate and display a standard message dialog box with a given prompt in the dialog box according to the specified buttons, title, helpfile and context arguments. The dialog box will wait for the user to click a button to continue. SyntaxMsgBox(prompt[, buttons][, title][, helpfile, context]) ArgumentpromptRequire. String expression displayed as the message in the dialog box. The maximum length of prompt is approximately 1024 characters, depending on the width of the characters used. If prompt consists of more than one line, you can separate the lines using a carriage return character (Chr(13)), a linefeed character (Chr(10)), or carriage return–linefeed character combination (Chr(13)&Chr(10)) between each line.buttonsOptional Setting. Numeric expression that is the sum of values specifying the number and type of buttons to display, the icon style to use, the identity of the default button, and the modality of the message box. See Settings section for values. If omitted, the default value for buttons is 0.titleRequired. String expression displayed in the title bar of the dialog box. If you omit title, the application name is placed in the title bar.helpfileRequired. String expression that identifies the Help file to use to provide context-sensitive Help for the dialog box. If helpfile is provided, context must also be provided. Not available on 16-bit platforms.contextRequired. Numeric expression that identifies the Help context number assigned by the Help author to the appropriate Help topic. If context is provided, helpfile must also be provided. Not available on 16-bit platforms.Settingbuttons argument vbConstantValueConstantvbOKOnly0Display OK button only.vbOKCancel1Display OK and Cancel buttons.vbAbortRetryIgnore2Display Abort, Retry, and Ignore buttons.vbYesNoCancel3Display Yes, No, and Cancel buttons.vbYesNo4Display Yes and No buttons.vbRetryCancel5Display Retry and Cancel buttons.vbCritical16Display Critical Message icon. vbQuestion32Display Warning Query icon.vbExclamation48Display Warning Message icon.vbInformation64Display Information Message icon.vbDefaultButton10First button is default.vbDefaultButton2256Second button is default.vbDefaultButton3512Third button is default.vbDefaultButton4768Fourth button is default.vbApplicationModal0Application modal. The user must respond to the message box before continuing work in the current application.vbSystemModal4096System modal. On Microsoft Win16 systems, all applications are suspended until the user responds to the message box. On Microsoft Win32 systems, this constant provides an application modal message box that always remains on top of any other programs that you have running The first group of values (0–5) describes the number and type of buttons displayed in the dialog box; the second group (16, 32, 48, 64) describes the icon style; the third group (0, 256, 512, 768) determines which button is the default; and the fourth group (0, 4096) determines the modality of the message box. When adding numbers to create a final value for the argument buttons, use only one number from each group.ReturnReturns a Variant of the Integer data subtype containing the type of button obtained from message dialog box clicked by the user.Return values of MsgBox function vbConstantValueConstantvbOK1OKvbCancel2CancelvbAbort3AbortvbRetry4RetryvbIgnore5IgnorevbYes6YesvbNo7No Remark
ReqVersion1ExamplesAlthough all modern browser does not support VBScript InputBox and MsgBox functions directly, VBScript can still be tested using Microsoft Internet Explorer 11 after adding '<meta http-equiv="x-ua-compatible" content="IE=10">' to HEAD tag. Both client side VBScript InputBox and MsgBox functions can be used in server side indirectly through creating a client side Script on the fly to run a ?document.write?. Ref.:https://msdn.microsoft.com/library/dn384057(v=vs.85).aspx https://msdn.microsoft.com/en-us/library/windows/apps/Hh700404.aspx Examples of MsgBox function HTML Document Input:
©sideway ID: 180400010 Last Updated: 4/10/2018 Revision: 0 Latest Updated Links
|
Home 5 Business Management HBR 3 Information Recreation Hobbies 8 Culture Chinese 1097 English 339 Reference 79 Computer Hardware 249 Software Application 213 Digitization 32 Latex 52 Manim 205 KB 1 Numeric 19 Programming Web 289 Unicode 504 HTML 66 CSS 65 SVG 46 ASP.NET 270 OS 429 DeskTop 7 Python 72 Knowledge Mathematics Formulas 8 Set 1 Logic 1 Algebra 84 Number Theory 206 Trigonometry 31 Geometry 34 Calculus 67 Engineering Tables 8 Mechanical Rigid Bodies Statics 92 Dynamics 37 Fluid 5 Control Acoustics 19 Natural Sciences Matter 1 Electric 27 Biology 1 |
Copyright © 2000-2024 Sideway . All rights reserved Disclaimers last modified on 06 September 2019