TQS Home
Trivia Quiz Shell Version 2.8 Now Available!Bot Productions Home
TQS 2.0

Back to Reference

DIVCODE Element

Specifies the HTML code that visually makes up the custom location type.

Syntax
<DIVCODE
  XMLCOMPLIANT="xmlcompliant">
  ...
</DIVCODE>
Attributes
XMLCOMPLIANT
TQS 2.1 If set to "1", means that the HTML code is valid XML code. This means:
  • Every tag has a closing tag, whether or not it is required by HTML. For example, <BR> in HTML must be entered as <BR/>.
  • All attributes must be in quotes.

Defaults to not compliant.

Placement

The DIVCODE element must be a child of the CUSTOMDIV element.

Children

No child elements will be interpreted by TQS.

Remarks

TQS 2.7 and earlier All id and class names, as well as any JavaScript variables or functions specified in event handlers, must begin with "S_". This is not required as of TQS 2.8.

To avoid potential display problems, you should break to a new line only within an HTML beginning or ending tag.

Unless the code is XML compliant as stated above, the script contents must use &gt; and &lt; instead of > and <, respectively, in all cases.

It is recommended that you test your HTML code in a standard web page before using it in a TQS application. Then, once it works, you can use find and replace to perform the above step (if non-XML compliant), and you can put the line breaks where they work for you.

Examples

The following shows how to use non-XML compliant code:

<DIVCODE>
  &lt;SPAN ID="matchingChoicesSpan"&gt;&lt;/SPAN
  &gt;&lt;H3 ID="matchingQuestionSpan"
  &gt;&lt;/H3&gt;&lt;H3 ID="matchingStatus"
  &gt; &lt;/H3&gt;&lt;SPAN ID="bottomButtons"
  &gt;&lt;BR&gt;&lt;BUTTON ID="matchNextButton"
  onclick="loadMatchQuestion(0);"
  STYLE="visibility:hidden"
  &gt;Next Question&lt;/BUTTON&gt;&lt;/SPAN&gt;
</DIVCODE>

The following code is equivalent, but XML compliant:

<DIVCODE XMLCOMPLIANT="1">
  <SPAN ID="matchingChoicesSpan"></SPAN
  ><H3 ID="matchingQuestionSpan"
  ></H3><H3 ID="matchingStatus"
  > </H3><SPAN ID="bottomButtons"
  ><BR><BUTTON ID="matchNextButton"
  onclick="loadMatchQuestion(0);"
  STYLE="visibility:hidden"
  >Next Question</BUTTON></SPAN>
</DIVCODE>

©2020 Bot Productions. All rights reserved.Last Updated: September 9, 2007