Understanding Access's Dynamic HTML ImplementationIf you're new to authoring dynamic Web pages, you first must grasp the terminology used by DAP. Internet-related terminology is replete with three- to five-letter acronyms (TLA and 5LA) that belie the complexity of the underlying technology. If you're conversant with DHTML basics, skip to the "Getting Acquainted with Page and Page Design Views" section. If you've worked with DAP in Access 2000 or 2002, you can move ahead to the "Modifying the Design of AutoPage DAP" section. Dynamic HTML doesn't currently have the status of an Internet standard, so DHTML implementations vary among browser publishers and versions. In this book, an Internet standard is defined as a World Wide Web Consortium (W3C) Recommendation or an Internet Engineering Task Force (IETF) Request for Comment (RFC). Most of today's W3C and IETF standards represent consensus among the groups' voting members vendors plus a few governments and universities not the Internet community as a whole. Technologies Supporting DHTML and DAPThe following is a brief list of the W3C Internet standards and proprietary Microsoft technologies that provide the foundation for Microsoft's implementation of DHTML and its use of DAP:
Note The examples in this and the next chapter use VBScript because of its similarity to VBA, which is the subject of Chapter 27, "Learning Visual Basic for Applications." VBScript is a subset of VBA, and many of the basic programming techniques described in Chapter 27 also apply to VBScript. Among commercial browsers, only IE supports VBScript. IE 5+ is required to create and display DAP, so the use of VBScript in place of the more widely supported ECMAScript isn't an issue in this case. DOM HTML and DHTMLDOM HTML describes elements of conventional HTML Web pages as a collection of predefined hierarchical objects based on W3C-standard HTML tags. Listing 24.1 shows the HTML source for a simple three-column, three-row table with row-column (RnCn) text in each cell. Listing 24.1 HTML Source for a Three-Column, Three-Row Table<html> <head> <title>New Page 1</title> </head> <body> <table border="1" width="100%"> <tr> <td width="33%">R1C1</td> <td width="33%">R1C2</td> <td width="34%">R1C3</td> </tr> <tr> <td width="33%">R2C1</td> <td width="33%">R2C2</td> <td width="34%">R2C3</td> </tr> <tr> <td width="33%">R3C1</td> <td width="33%">R3C2</td> <td width="34%">R3C4</td> </tr> </table> </body> </html> Figure 24.3 illustrates the object hierarchy of the HTML elements defined by Listing 24.1. Like the master-child relationships of forms and subforms, DOM defines parent-child(ren) relationships between objects and properties, which can also be collections of objects. The <HTML> tag defines the document parent object; the document object has a child <HEAD> element, which contains <META> and <TITLE> children; and a <BODY> element (body object), which contains all other elements of the page. The <TABLE> element contains a collection of <TR> row elements, each of which contains a <TD> data or column collection. Microsoft's DOM for the HTML that creates pages is much more complex than this example. Figure 24.3. This diagram depicts the DOM object model for the table created by the HTML code of Listing 24.1.
Note Microsoft's DHTML documentation and this chapter use the terms "element" (HTML tag pair) and "object" interchangeably. DOM HTML also defines an event model for objects. The event model lets Web page authors specify what occurs when a page loads in your browser or when you click an element. Event-handling code, written in a scripting language, specifies the action taken when an event occurs. An object must have a unique Id property value, similar to the Name property of Access controls, to connect event-handling code to the object. |