Scripting

Initially the role of the browser was to render Web pages on the client computer. Web page- are simple text files with the text and information as to how the text should appear in the browser’s window. HTML is a document-formatting language basis RTF (Rich Text Format); it’s not a programming language. Displaying a Web page in the browser is similar to rendering an RTF file on. the RichTextBox control and you can’t use HTML to carry out even simple calculations such as additions or to display the day’s name in the browser’s window.

Most clients however are powerful computers that can do much more than display documents. To expioit the processing power of the clients scripting languages have been introduced the simplest being VB Script. Scripting enables Web authors to create dynamic content by embedding executable scripts directly in an HTML page. You can use VB Script to program the elements of a Web page as well as server applications (through Active Server Pages). You’ll see shortly how a Web page can interact (to a limited extent of course) with the viewer through scripts and how some of the processing that would normally take place on the server can be carried out by the client.

Dynamic HTML (DHTML)

Dynamic HTML (DHML) is a departure from HTML. It doesn’t introduce any new tags but makes the existing tags programmable. It lets you mix HTML tags with VB Script statements to manipulate the appearance of the document dynamically. For example it supports layering which allows you to rearrange elements on a page in response to the user’s actions. You can overlap images and specify that the image under the pointer be brought in front of the others. When the pointer is  moved over another image that image is brought on top. Or you can change the color. of text elements (such as headings, table cells, and so on) when the pointer moves over them.

DHTML can add rich multimedia effects to a page such as moving sprites (irregularly shaped images that can be moved around or behind and in front of one another) color gradients across text dynamic audio mixing transition effects and more without the involvement of the server. DHTML includes animation and multimedia controls that can be used to apply visual effects to selected elements on a page or to the entire page. These controls support filters animation and transitions features that will allow you to build pages with some of the effects used on television today. Multimedia capabilities are no longer added features but capabilities built into this new flavor of HTML. The multimedia controls you use in your HTML pages are not discussed in this chapter but you ‘ can find additional information  Another feature of DHTML which makes it suitable <for business applications is data awareness. Each data-aware page contains an invisible ActiveX control that e communicates with a data source similar to the Data control of Visual Basic. With this control you can create Forms with intrinsic ActiveX controls that are bound to fields in a record. data entered by the user in the control is saved to the Data Source control which can transmit the data to the server under program control.

Scroll to Top