Defines HTML text inserted into the containing document.
<layout> <HTMLtag>Inserted text</HTMLtag> </layout>
When the behavior is called, the text in the <layout> element is read into the corresponding element in the containing document. This behavior is equivalent to setting the element's DHTML innerHTML property.
If the script component is not defined to be XML-conformant, the contents of the <layout> element are opaque. However, if the script component is XML-conformant, the contents of the <layout> element must explicitly be made opaque by including them in a CDATA. For more details, see Script Component Files and XML Conformance.
The following shows an example of a script component with a <layout> element. Because the script component contains the <?XML ?> declaration at the top, the <layout> element contains a CDATA section to make the contents of the <layout> element opaque to the XML parser.
<?XML version="1.0" ?> <component id="bvrScriptlet1"> <registration progID="BehaviorScriptlet"/> <implements type="Behavior"> <layout> <![CDATA[ <h1>This is the HTML to show in the element</h1> ]]> </layout> </implements> </component>
For general information about applying behaviors to DHTML elements, see the "Using DHTML Behaviors" topic on the Site Builder Network (SBN).