|MSc-IT Study Material|
June 2010 Edition
Computer Science Department, University of Cape Town
Table of Contents
Web browsers were originally designed to interpret HTML with two primary purposes: to render documents marked up in HTML to an acceptable level of quality, and, crucially, to be able to follow hyperlinks to resources. As the Web grew, so did the demand for more sophisticated Web content. Among many other extensions, graphics, forms, and tables were added to the HTML standard. With the exception of forms, there is nothing in HTML that supports interaction with the user. Given the ubiquity of Web browsers, and the effort which millions of ordinary people have put into learning to use them, they provide an almost universal starting point for interacting with complex systems, particularly commercial, Internet based systems. Hence the need for sophisticated interaction facilities within Web browsers.
For example, the following message could be given to a user when they submit a form with a missing field:
<SCRIPT> window.alert('Error with form: You forgot to fill in the billing address!') </SCRIPT>
Constructor functions have a special Prototype property which is used to implement inheritance, as will be explained later in the chapter on objects. Constructor functions are called using the new keyword when creating objects.
A user may request a document via an URL; a Web server delivers the document to a Web browser which not only displays it, but also executes any interactive elements.