User Guide

Code validation 107
alert("Word " + i + " is " + arrayWords[i]);
}
}
var tokens = new Array("Hello", "world");
displayWords(tokens);
]]></sampleText>
</scheme>
JavaScript sample text
The sample text for the JavaScript scheme illustrates the JavaScript code coloring scheme as
follows:
* JavaScript */
function displayWords(arrayWords) {
for (i=0; i < arrayWords.length(); i++) {
// inline comment
alert("Word " + i + " is " + arrayWords[i]);
}
}
var tokens = new Array("Hello", "world");
displayWords(tokens);
The following lines from the Colors.xml file provide the color and style values that are seen in the
sample text and were assigned by the code coloring scheme:
<syntaxColor id="CodeColor_JavascriptComment" text="#999999" italic="true" />
<syntaxColor id="CodeColor_JavascriptFunction" text="#000000" bold="true" />
<syntaxColor id="CodeColor_JavascriptBracket" text="#000099" bold="true" />
<syntaxColor id="CodeColor_JavascriptNumber" text="#FF0000" />
<syntaxColor id="CodeColor_JavascriptClient" text="#990099" />
<syntaxColor id="CodeColor_JavascriptNative" text="#009999" />
Code validation
When opening a document in Code view, Dreamweaver automatically validates that the
document is not using any tags, attributes, CSS properties, or CSS values that are not available in
the target browsers that the user selected. Dreamweaver underlines errors with a wavy red line.
Dreamweaver stores browser profiles in the Browser Profile folder inside the Dreamweaver
Configuration folder. Each browser profile is defined as a text file that is named for the browser.
For example, the browser profile for Internet Explorer version 6.0 is Internet_Explorer_6.0.txt.
To support target browser checking for CSS, Dreamweaver stores CSS profile information for a
browser in an XML file whose name corresponds to the browser profile but with a suffix of
_CSS.xml. For example, the CSS profile for Internet Explorer 6.0 is
Internet_Explorer_6.0_CSS.xml. You might want to make changes to a CSS profile file if you
find that Dreamweaver is reporting an error that you do not want.
The CSS profile file consists of three XML tags:
css-support, property, and value. The
following sections describe these tags.