O'Reilly logo

JavaScript™ 1.5 by Example by Kathie Kingsley-Hughes, Adrian Kingsley-Hughes

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required