- The Fundamentals of VBScript
- VBScript Versus VB
- Creating Variables in VBScript
- Concatenating Strings
- Arrays and Loops
- Resizing Arrays
- Inequality Operators
- Conditional Statements
- Select Case Statements
- Sub
- Function
- Working with Arguments
- Beware of Types
- Event Procedure Naming Syntax
- Server-Side Events
- Local Variables
- Script-Level Variables
<SCRIPT Language = VBScript RUNAT=Server>
You use the RUNAT attribute of the <SCRIPT> tag if you want to write VBScript code that runs on a server only. The <SCRIPT> tag HTML in Listing 3.2 uses the RUNAT attribute to indicate that the script is to be executed on the IIS server and then sent to the calling browser. Again, do not get too caught up in figuring out the script syntax. The important thing here is to understand that the RUNAT attribute makes the script run on the server side.
Listing 3.2: Using the RUNAT Attribute to Run Server-Side Script (03asp02.asp)
<HTML> <HEAD> <TITLE></TITLE> </HEAD> <BODY> <SCRIPT LANGUAGE=VBScript RUNAT=Server> Response.Write("<FONT SIZE=6 FACE=ARIAL>") Response.Write("I am writing this from the server side") Response.Write("</FONT>") </SCRIPT> <P> </P> </BODY> </HTML>
The output of this script is shown in Figure 3.2.
Figure 3.2 Server-side VBScript outputs HTML to the calling browser.