
here's a core set of problems that every JavaScript developer will run across sooner or later. In my Web Developer classes, I've noticed that some questions arise repeatedlythey're common problems. The answers to these problems aren't readily apparent from studying the language itself, because they're not directly related to JavaScriptthey're browser and HTML-dependent problems. This article shows you how to deal with eight of the most common situations. Even if you don't need them today, file them away to form the beginnings of your core library of cross-browser JavaScript.

Sniffing the Browser

Learn to recognize these and similar situations because you're likely to encounter them repeatedly. All of these solutions are cross-browser scripts that have been tested in Internet Explorer 4+, Netscape 4.x, and Netscape 6.