Home > Articles

  • Print
  • + Share This

<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>&nbsp;</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.

  • + Share This
  • 🔖 Save To Your Account

Related Resources

There are currently no related titles. Please check back later.