|
||||||||
After the browser receives the HTML document (together with the embedded images and objects), the browser is on its own. It does not interact with the web server until next HTTP request. The HTML we learnt permits only static pages. In this section of the course, we learn how to add life to HTML page through scripting.
I wrote them for learning the basics of scripting HTML control and layer.
The most popular scripting language in browser is JavaScript, invented by Netscape. It's available in both IE and Netscape browser. After studying the JavaScript language, we learn how to script the built-in HTML controls (e.g. text box, button, radio button) and browser object (e.g. windows, frames, document and history). We will apply these skills for client-side validation.
Microsoft IE comes with another built-in scripting language, VBScript. This is the language commonly used in IIS's ASP. In the browser, VBScript is equally expressive and can be used anywhere you use JScript (the Microsoft dialet of JavaScript in IE).
A power enhancement of the 4th generation of browsers (Navigator 4+ and IE 4+) is Dynamic HTML. You can position content by absolute coordinates, move them, and hide them. One can make a very sophisticated interactive interface using them. Unfortunately, the two browsers expose the HTML document in different object model (called Document object model DOM). This makes writing cross-browser Dynamic HTML really troublesome.
In addition to scripting the standard control in HTML, one can also script ActiveX control / plug-ins embedded in a HTML page. Conceptually, this is similar to visual programming with VB or Delphi. We also explore this view in the last part of our discussion of client-side scripting.
|
||||||||||||||||