Click Here!
home account info subscribe login search My ITKnowledge FAQ/help site map contact us


 
Brief Full
 Advanced
      Search
 Search Tips
To access the contents, click the chapter and section titles.

HTML 4.0 Sourcebook
(Publisher: John Wiley & Sons, Inc.)
Author(s): Ian S. Graham
ISBN: 0471257249
Publication Date: 04/01/98

Bookmark It

Search this book:
 
Previous Table of Contents Next



Table 7.7 Event Handling Attributes Defined in HTML 4 and Their Meanings Most of these event handlers are understood by Internet Explorer 4, but not by Netscape Navigator 4.

Attribute Conditions for Event
(A) Generic Event Handling Attributes
Supported by most elements
onClick Event occurs when the mouse button is clicked over an element.
onDblClick Event occurs when the mouse button is double clicked over an element.
onMouseDown Event occurs when the mouse button is pressed over an element.
onMouseUp Event occurs when the mouse button is released over an element.
onMouseOver Event occurs when the mouse is moved onto an element.
onMouseMove Event occurs when the mouse is moved while it is over an element.
onMouseOut Event occurs when the mouse is moved away from an element.
onKeyPress Event occurs when a key is pressed and released while the element has focus.
onKeyDown Event occurs when a key is pressed down while the element has focus.
onKeyUp Event occurs when a key is released while the element has focus.
(B) Special–Purpose Event Handlers
Apply only to specific elements
onBlur Event occurs when an element loses focus, either by selecting another element using the mouse or by using tabbing navigation to select another element. This attribute is supported by the form–specific elements LABEL, INPUT, SELECT, TEXTAREA and BUTTON.
onFocus Event occurs when an element receives focus either by the mouse selection or by selection using tabbing navigation. This attribute is supported by the same form–specific elements as onBlur.
onLoad Event occurs when the browser finishes loading a window or when it finishes loading all the frames within a frameset. This attribute is thus supported by BODY and FRAMESET.
onUnload Event occurs when the browser removes a document from a window, or e removes an entire set of frames within a specified frameset. This attribute is thus supported by BODY and FRAMESET.
onSubmit Event occurs when a form is submitted. This attribute is supported by the FORM element.
(B) Special–Purpose Event Handlers
Apply only to specific elements
onReset Event occurs when a form is reset. This attribute is supported by the FORM element.
onSelect Event occurs when a user selects some text in a text field, for example by using the mouse to mark a text selection. This attribute may be used with the INPUT and TEXTAREA elements, although it is relevant only for INPUT elements of TYPE=“text” and TYPE=“password.”
onChange Event occurs when a form input mechanism loses the input focus and has also had its value modified since the element gained focus. This attribute is supported by the INPUT, SELECT, and TEXTAREA elements.

The Document Object Model

The Microsoft and Netscape approaches are similar in goal, but very different in implementation. However, both approaches depend on a model for the browser and the displayed page as a collection of objects that can be manipulated and processed. This model has come to be know as the Document Object Model, or DOM.

Unfortunately, Netscape and Microsoft employ slightly different models, so that it is becoming practically impossible to write scripting software for one browser that will also work on the other.

Fortunately, the World Wide Web Consortium has formed a DOM working group, which is working towards defining an open DOM model to be used by all browser vendors. Both Microsoft and Netscape are active participants in the DOM working group, and with much hard work and some luck, it is likely that this group will define an “open” DOM standard sometime in mid–1998. If this standard is adopted by both Netscape and Microsoft, we can look forward to a much more exciting future of compatible scripting and dynamic HTML content in all browsers.

Internationalization of HTML

Internationalization refers to the process of modifying software and software systems to support the world’s languages and to operate with an interface customized for any of these languages. For HTML, this means the ability to use character sets other than ISO Latin–1, as well as the ability to support truly multilingual documents—that is, documents containing more than one language.


Elements and Attributes Related to Internationalization
HTML Elements BDO
Attributes DIR, LANG
Attribute Function DIR=“ltr”, “rtl” (optional; mandatory for BDO)—specify directionality of text flowLANG=“lang–code” (optional) —specify language for text within the element

HTML 4 incorporated several major changes in support of internationalization. First, the document character set for HTML was changed from ISO Latin–1 to another set that supports more of the characters used by the world’s languages. The required characters or symbols (glyphs) number in the tens of thousands, a far cry from the 200–odd characters possible with ISO Latin–1. The character set is known as Unicode. When Unicode is the selected character set, every character reference refers to a Unicode character— thus the reference δ refers to the 948th character in the Unicode character set, which is the Greek lowercase letter δ. Second, new elements and attributes were added to specify the language used within a particular element or the direction in which the characters should be drawn on the display.

Internationalized Character Sets

To support truly international applications, HTML must support a character set that in turns supports all the characters and symbols of all the world’s languages. This is a tall order! Unfortunately, the specified character set of HTML 3.2 was ISO Latin–1, an 8–bit character set that only supports some 200–odd characters common in Western European languages. This is, to say the least, insufficient—ISO Latin–1 is useless for non–European languages, while any standard 8–bit character set is clearly insufficient for languages, such as Chinese or Japanese, where the required repertoire of characters far exceeds the 256 character limit of an 8–bit character set.


Previous Table of Contents Next


Products |  Contact Us |  About Us |  Privacy  |  Ad Info  |  Home

Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement.