Java Reference
In-Depth Information
relevant to that part of the browser and adjusting it, the DOM requires navigation through its represen-
tation of the page through nodes and properties that are not specifi c to the browser. You'll explore this
structure a little later.
However, to use the DOM standard, ultimately developers require browsers that completely implement
the standard, something that no browser does 100 percent effi ciently, unfortunately. To make matters
worse, no one browser implements the exact same DOM features that other browsers support, but
don't be scared off yet. All modern browsers support many of the same features outlined by the DOM
standard.
To provide a true perspective on how the DOM fi ts in, I need to take a brief look at its relationship
with some of the other currently existing web standards. I should also talk about why there is more
than one version of the DOM standard, and why there are different sections within the standard itself.
(Microsoft, in particular, added a number of extensions to the W3C DOM.) After understanding the
relationships, you can look at using JavaScript to navigate the DOM and to dynamically change content
on web pages in more than one browser, in a way that used to be impossible with pure DHTML. The
following items are on your agenda:
The (X)HTML, ECMAScript, and XML Web standards
The DOM standards
Manipulating the DOM
Writing cross-browser DHTML
Remember that the examples within this chapter are targeted only at the DOM (with very few excep-
tions) and will be supported only by IE 8+, Firefox 1+, Opera, Safari 3+, and Chrome.
The Web Standards
When Tim Berners-Lee created HTML in 1991, he probably had little idea that this technology for mark-
ing up scientifi c papers via a set of tags for his own global hypertext project, known as the World Wide
Web, would within a matter of years become a battleground between the two giants of the software
business of the mid-1990s. HTML was a simple derivation from the meta-language Standard Generalized
Markup Language (SGML) that had been kicking around academic institutions for decades. Its purpose
was to preserve the structure of the documents created with it. HTML depends on a protocol, HyperText
Transfer Protocol (HTTP), to transmit documents back and forth between the resource and the viewer (for
example, the server and the client computer). These two technologies formed the foundation of the Web,
and it quickly became obvious in the early 1990s that there needed to be some sort of policing of both
specifi cations to ensure a common implementation of HTML and HTTP so that communications could be
conducted worldwide.
In 1994, Tim founded the World Wide Web Consortium (W3C), a body that set out to oversee the techni-
cal evolution of the Web. It has three main aims:
To provide universal access, so that anybody can use the Web
To develop a software environment to allow users to make use of the Web
To guide the development of the Web, taking into consideration the legal, social, and commer-
cial issues that arise
Search WWH ::




Custom Search