13. Learning About the Environment

“To change your world, you must first know yourself.” I don’t know whether this is an ancient proverb or whether I simply made it up, but it definitely applies to DHTML. Many of the functions you will be creating to add interactivity to your Web page rely on knowing where something is, how big it is, and what it is doing. So to change your Web page, the Web page must first know itself.

This chapter discusses the details of the environment in which an object is being displayed, such as the screen size and browser-window size. The two chapters after this will show you how to find out information about the object itself (Chapter 14) and events triggered by an object (Chapter 15).

Detecting the Operating System ...

Get CSS, DHTML, and Ajax: Visual QuickStart Guide, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.