Finding Errors

Let's take a look at how Netscape Navigator 4, Netscape Navigator 6, and Internet Explorer 5.5 handle the following error:

<script language="JavaScript">
<!-- Cloaking device on!
alrtt("This will not work!");
// Cloaking device off -->
</script>

Here, notice a simple syntax error—the spelling of “alert.”

Figure 10.3 shows this error as handled by Netscape Navigator 4.

Figure 10.3. A Web page with a syntax error in Netscape Navigator 4.

As you can see from Figure 10.3, there are no visible signs of the error. Well, that isn't really ...

Get JavaScript™ 1.5 by Example now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.