Many of the technologies that make the World Wide Web possible
have far exceeded their original goals. Envisioned at the outset as
a medium for publishing static text and image content across a
network, the Web is forever being probed, pushed, and pulled by content
authors. By taking for granted so much of the ‘‘dirty work’’ of conveying the
bits between server and client computers, content developers and programmers
dream of exploiting that connection to generate new user experiences and
practical applications. It’s not uncommon for a developer community to
take ownership of a technology and mold it to do new and exciting things.
But with so many web technologies — especially browser programming
with JavaScript — within reach of everyday folks, we have witnessed an
unprecedented explosion in turning the World Wide Web from a bland
publishing medium into a highly interactive, operating system–agnostic
authoring platform.
The JavaScript language, working in tandem with related browser features, is a
web-enhancing technology. When employed on the client computer, the language
can help turn a static page of content into an engaging, interactive, and
intelligent experience. Applications can be as subtle as welcoming a site’s visitor
with the greeting ‘‘Good morning!’’ when it is morning in the client computer’s
time zone — even though it is dinnertime where the server is located. Or, applications
can be much more obvious, such as delivering the content of a slide show
in a one-page download while JavaScript controls the sequence of hiding, showing,
and ‘‘flying slide’’ transitions as we navigate through the presentation.
Of course, JavaScript is not the only technology that can give life to drab web
content. Therefore, it is important to understand where JavaScript fits within the
array of standards, tools, and other technologies at your disposal. The alternative
technologies described in this chapter are HTML, Cascading Style Sheets (CSS),
server programs, and plug-ins. In most cases, JavaScript can work side by side
with these other technologies, even though the hype can make them sound like
one-stop shopping places for all your interactive needs. (That’s rarely the case.)
Finally, you learn about the origins of JavaScript and what role it plays in today’s
advanced web browsers.