answersLogoWhite

0

VBScript, is a versatile programming language, using multiple different ways to display it's output.

VBScript code can be written inside of a web page: [.html]/or else, the web page can link to the code which has being saved as an external script file: [.vbs]. When used inside of the web page, VBScript uses the window document object to display it's output.

VBscript files can also be both written and run as being a purely stand alone file: [.vbs]; in the which case it doesn't need any web page document object to display it's output; but, instead, the output is displayed using a standard windows dialog message box.

Example 1> VBScript, written inside of a web page

For example, when VBScript code is being written inside of a web page...it uses the web page document window object itself to write it's output to; in the which case, the output statement might look like this...

USER INSTRUCTIONS: Save the above file as being called: vbs01.html

...then, left double click on the file to run/make the code execute.

NOTE(1): Only web browser MSIE/Microsoft Internet Explorer knows how to run VBScript code, successfully; without needing to use any external browser plug in. Therefore, the above code is certainly not guaranteed to work/run inside of any other web browser software; which, most probably, won't even understand it at all?!

That's the reason why the above code uses HTML comment notation: to hide the VBScript code from other Web Browsers that might not be able to understand it; in this way, the VBScript code will not accidentally be displayed if the web browser doesn't know what it is; instead, the code will, quite simply, be 'ignored'; and, thus, remain hidden instead.

NOTE(2): In order to use VBScript within a web page; you first need to surround the code with a pair of open and close: tags.

NOTE(3): The use of a pair of brackets: () to enclose the "string literal" text is entirely optional.

Example 2> VBScript, written as a stand alone document file

MsgBox "Hello, world! (1)"

'...which could alternatively be written as...

MsgBox("Hello, world! (2)")

'...in this case a Windows standard Dialog Box is used to display the output text.

USER INSTRUCTIONS: Save the above file as being called: vbs02.vbs

...then, left double click on the file to run/make the code execute.

NOTE(1): A stand alone VBScript (.vbs) file...has no window object to send it's output to...so, it uses a Windows standard dialog message box to display output messages.

NOTE(2): The use of a pair of brackets: () to enclose the "string literal" text is entirely optional.

User Avatar

Wiki User

11y ago

What else can I help you with?

Related Questions

What kind of boxes do GUIs use to provide information and prompt responses to the user?

MessageBox.show is used to display information to user by coding.


What control do you use to display information you do not want the user to change?

Label


How does a VBScript work?

VBScript, like Javascript is an interactive scripting language that works within HTML. For more information on how to use VBScript, visit the W3 Schools website by clicking on the related link.


When was VBScript created?

VBScript was created in 1996.


Write a shell program called whos to display a sorted list of the logged in usersJust display the user names and no other information?

The 'users' command should do that; you don't need to write a shell script to get that information in that format.


Display devices are usually classified as what type of devices?

Display devices are typically classified as output devices. Output devices are components of a computer system that present data or information to the user. Display devices include monitors, projectors, and screens, and they visually represent the processed data from the computer system for user interaction.


What is vbscript?

! VBScript is a Microsoft created program. It stands for Visual Basic Scripting


When does Defense Travel System display the user activation screen?

Only the first time the user logs in to DTS does the Defense Travel System display the user activation screen.


Are objects that display data and perform actions They allow you to work with labels and images to improve the user surface?

Yes, objects that display data and perform actions are integral to user interfaces. They enable interaction by presenting information through labels and images, enhancing the overall user experience. These elements facilitate communication between the user and the system, making it easier to understand and engage with the application.


What is a display operator?

A display operator is a type of operator used in programming and data visualization that handles the presentation of information to users. It formats and organizes data for clear and effective display, often in graphical user interfaces or reports. Display operators can also include functionalities for sorting, filtering, and enhancing the visual appeal of the data presented. Their primary role is to improve user interaction and comprehension of the underlying data.


What is the display screen that the user interacts with?

Monitor


Which type of control would you most likely use to display name information in access?

To display name information in Access, you would most likely use a text box control. This allows users to input or view text data such as names in a user-friendly manner. You can bind the text box control to a field in a table or query to display the name information stored in your database.