ActiveX Scripting on the Web
Scripting languages like VBScript are designed to augment HTML.
------------------------------------------------------------------------------------
--------------------------------------------------
You can access information on the inactive HTML Web page by calling it up with a hyperlink request. Questions can only be asked through links to pre-structured answers, so there is the same lack of interactivity as with TV channels.
Interaction can be heightened by adding active elements. For example, you can trigger a search event at Amazon.com or access examples of ActiveX Controls or transfer to other pages. But that's the extent of your interactions.
The bottom line is that you can learn in the traditional sense. You have to work by means of your ability to read. To interact with other viewers, you need external means, such as e-mail. There is still essentially no opportunity for you to engage directly in a more active -- or more interactive -- learning process. This is a major difficulty with distance learning.
----------------------------------------------
One way to extend the functionality of HTML towards full interactive processes is to use scripting, using a scripting language such as JavaScript or VBScript). These two languages are shorter versions of Java and Visual Basic, respectively, and are designed to work with HTML and be embedded in HTML pages.
-----------------------------------------------
A scripting language is an abbreviated program development language to be embedded in HTML script and run in your Web browser. The language works within the bounds of the hypertext language and adds functionality to it. When building pages for a training program, for example, you can heighten its potential by allowing the user/trainee to play a more active role and do more than simply call up "slides" to view.
As an example, VBScript makes it possible for the trainee to check values entered into a data form before the form is transmitted to the server, presuming the server is already set up to handle the forms. The scripting language allows transmission by enhancing the ability of your program to use the special HTML tags that characterize the hypertext language. Now though, the VBScript program instructions have to be interpreted. For the system to work, you need a browser that can read it -- like Internet Explorer, for example.
To be able to write Web-based training applications using VBScript, you need to meet a number of prerequisites. Among other things, you need to:
For main ideas of VBScript, click here.
----------------------------------------------
One of the fundamental techniques of HTML is the device used to identify the beginning and end of a segment of code. This is the use of so-called tags, and they usually come in pairs.
The HEAD Tag
One such tag pair is used to identify the Head of a page and has the form:
<HEAD> ... </HEAD>
The procedure with such tags is to list the first of the pair first, follow this up with the code to define what goes in the Head segment of the page, and then list the second of the pair. Note that the forward slash in the second tag is the key to identifying the closing for that segment. In other words, the pair defines the beginning to end of the Head section.
Similar pairs identify the Body of a page and what is called the Form.
The SCRIPT Tag
The special HTML tag pair used to embed other script language programs is:
<SCRIPT> ... </SCRIPT>
The same embedding technique used for the Head of the page is used here. Since there are different scripting languages, though, you need a way to say which one you're working with. This is done by putting the ID inside the first tag of the tag pair, as follows:
<SCRIPT LANGUAGE="VBS">
The script tag itself has to be placed somewhere in the formatting structure. As it happens, there are three major divisions in the format, and they just happen to be Head, Body, and Form. The script code must therefore be put in one or the other of the three. Its placement is determined by the desired scope of the program.
Scope
The way HTML scripting is defined, the major divisions have different properties. In particular, Head has different scope than Body or Form, which is to say its content has a different degree of accessibility for other programs, or different levels of influence on objects.
In this sense, Head programs have global scope, and Body and Form programs only have local scope. (These terms are comparable in meaning to the terms public and private.) This means that the programs included in the Head section are available to programs in the other sections, whereas programs in Body and Form are only available to others in their sections.
When your browser loads a Web page, any HTML contained in the Head section is brought in first. If you want your additional script code to be accessible to other segments of your training program, this is where you would put it. In other words, you would first insert it between the tags <SCRIPT LANGUAGE="VBS"> and </SCRIPT>, and you would insert this complex between <HEAD> and </HEAD> (note the forward slash!).
The OBJECT Tag
Another important HTML tag (or tag pair) is identified as an Object tag and is written as:
<OBJECT> ... </OBJECT>
As you would expect, this tag is used to embed objects into HTML. It can be used to embed objects like ActiveX Controls, in particular. As I say here, these controls extend the earlier versions of controls that depend on the use of forms, or form objects, for their operation. Integral to it, the Object tag has associated with it a number of attributes and properties.
Attributes
The Object tag was created to provide a more convenient way to deal with the variety of objects developed for use on the Web. Because of the continued growing number of new objects, though, it is accreting quite a few of the associated attributes. The list currently includes attributes like DATA, WIDTH, ID, CODEBASE, and CLASSID. You can find the list in Coombs, et al, and I'll leave it to you to check out the details and follow upgrades.
The attributes for a specific object are written within the brackets of the first tag of the Object pair, as follows:
<OBJECT CODEBASE="..." CLASSID="..." WIDTH="..." HEIGHT="..." ...>
You have to fill in the blanks, of course.
Properties
Following the techniques of object-oriented programming, we have an additional number of related properties to consider for control objects. We have to have a way to set the properties in the embedding process. This is accomplished by using another special tag called a Parameter tag. It has the simple form:
<PARAM>
PARAM is just short for parameter, which essentially means constant.
One such tag is used for each property of the object being embedded
, and it gives the name of the property and its value. Say the property is called Height and the value of the property is 20. The tag is then written as:<PARAM NAME="HEIGHT" VALUE="20">
The parameters for an object may be listed after the first tag of the Object tag pair.
-----------------------------------------------