FIGURE 6-29
Insert either JavaScript or VBScript using the Insert bar??™s Script object.
Some older browsers break when loading a JavaScript Web page and display the code written
between the tag pair. Although Dreamweaver doesn??™t prevent this
problem by default, you can use a trick to prevent this anomaly. In Code view or the Code inspector, insert
the opening comment tag (), preceded by two forward slashes, right before the closing . An example follows:
The comment tags effectively tell the older browser to ignore the enclosed content. The two forward slashes
in front of the closing comment tag are JavaScript??™s comment indicator, which tells it to ignore the rest of
the line.
TIP TIP
202
Designing and Crafting Core Pages Part II
Validating Your Page
Syntax??”the rules governing the formation of statements in a programming language??”is important
regardless of which language your pages employ. Earlier browsers tended to be more relaxed about following
the syntactical rules of HTML, but as standardization becomes increasingly important, browsers??”and
businesses??”are following suit.
Pages:
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451