QueryODBC >
HTML Template File
Overview
The HTML template file controls the format of query results or schema data saved as a web page. Several sample HTML template files are provided with QueryODBC. You can create an unlimited number of your own template files. With HTML template files, you can generate a completely customizable web page that includes a table containing your query results plus any other images/text/etc. you desire.
QueryODBC's HTML template file supports the following HTML tags: HTML, BODY, FONT, TABLE, COL, THEAD, TR, TH, TBODY, and TD. Within these tags, you can specify the value of any or all attributes supported by the tag. You can include an unlimited number of sub-tags within the TH and TD tags (i.e. FONT, B, I, U, etc.). Additionally, you can enumerate the COL, TR (within the table body), TH and TD tags. Enumeration allows you to create repeating formats by row and/or column.
The template tags related to the display of query results are common HTML tags that generally will appear more than once in the HTML source code for a web page. As a result, these tags must be preceded with the comment "!--T--" in the template file so that QueryODBC can distinguish the query result related tags from the other tags in your web page.
For more details regarding the HTML template file content, layout and rules, see the file…"QUERYODBC\HTMLTMPL\SAMPLE.HTX."
Samples
The following sample HTML documents were produced using the HTML template files provided with QueryODBC. The name of the HTML template file as well as the techniques used in the file are discussed for each example.
HTML Template File "Default.htx"

The contents of this HTML template file is as follows:
<HTML>
<BODY>
<!--T--><FONT>
<!--T--><TABLE BORDER=1 CELLPADDING=2 CELLSPACING=1>
<!--T--><COL>
<!--T--><THEAD>
<!--T--><TR>
<!--T--><TH></TH>
<!--T--></TR>
<!--T--></THEAD>
<!--T--><TBODY>
<!--T--><TR>
<!--T--><TD NOWRAP></TD>
<!--T--></TR>
<!--T--></TBODY>
<!--T--></TABLE>
<!--T--></FONT>
</BODY>
</HTML>
This file demonstrates the specification of attributes within the TABLE and TD tags.
HTML Template File "Accting.htx"

The contents of this HTML template file is as follows:
<HTML>
<BODY>
<!--T--><FONT>
<!--T--><TABLE BORDER=1 CELLPADDING=2 CELLSPACING=1>
<!--T--><COL>
<!--T--><THEAD>
<!--T--><TR BGCOLOR=#00008B>
<!--T--><TH><FONT COLOR=#FFFFFF></FONT></TH>
<!--T--></TR>
<!--T--></THEAD>
<!--T--><TBODY>
<!--T--><TR BGCOLOR=#FFFFFF>
<!--T--><TD NOWRAP ></TD>
<!--T--></TR>
<!--T--><TR BGCOLOR=#90EE90>
<!--T--><TD NOWRAP></TD>
<!--T--></TR>
<!--T--></TBODY>
<!--T--></TABLE>
<!--T--></FONT>
</BODY>
</HTML>
This file demonstrates the specification of attributes within the TABLE, TR and TD tags, the specification of sub-tags within the TH tag, and the enumeration of TR tags within the TBODY tag (causes repeating formatting by row).
HTML Template File "Accting2.htx"

The contents of this HTML template file is as follows:
<HTML>
<BODY>
<!--T--><FONT>
<!--T--><TABLE BORDER=3 CELLSPACING=0>
<!--T--><COL>
<!--T--><THEAD>
<!--T--><TR BGCOLOR=#00008B>
<!--T--><TH><FONT COLOR=#FFFFFF></FONT></TH>
<!--T--></TR>
<!--T--></THEAD>
<!--T--><TBODY>
<!--T--><TR BGCOLOR=#FFFFFF>
<!--T--><TD NOWRAP ></TD>
<!--T--></TR>
<!--T--><TR BGCOLOR=#FFFFFF>
<!--T--><TD NOWRAP ></TD>
<!--T--></TR>
<!--T--><TR BGCOLOR=#90EE90>
<!--T--><TD NOWRAP></TD>
<!--T--></TR>
<!--T--><TR BGCOLOR=#90EE90>
<!--T--><TD NOWRAP></TD>
<!--T--></TR>
<!--T--></TBODY>
<!--T--></TABLE>
<!--T--></FONT>
</BODY>
</HTML>
This file demonstrates the specification of attributes within the TABLE, TR and TD tags, the specification of sub-tags within the TH tag, and the enumeration of TR tags within the TBODY tag (causes repeating formatting by row).
HTML Template File " EnmBCell.htx"

The contents of this HTML template file is as follows:
<HTML>
<BODY BGCOLOR=#DCDCDC>
<P><B>This is web content other than query results</B></P>
<!--T--><FONT>
<!--T--><TABLE BGCOLOR=#F0F0DD BORDER=2 CELLPADDING=1 CELLSPACING=4>
<!--T--><COL>
<!--T--><THEAD>
<!--T--><TR BGCOLOR=#2F4F4F>
<!--T--><TH><FONT COLOR=#FFFFA0><i></i></FONT></TH>
<!--T--></TR>
<!--T--></THEAD>
<!--T--><TBODY>
<!--T--><TR>
<!--T--><TD NOWRAP BGCOLOR=#FFFFFF><i></i></TD>
<!--T--><TD NOWRAP BGCOLOR=#FFEBCD></TD>
<!--T--></TR>
<!--T--></TBODY>
<!--T--></TABLE>
<!--T--></FONT>
<P><B>This is more web content other than query results</B></P>
</BODY>
</HTML>
This file demonstrates the specification of attributes within the BODY, TABLE, TR and TD tags, the specification of sub-tags within the TH and TD tags, and the enumeration of TD tags within the TBODY-TR tag (causes repeating formatting by column). The file also demonstrates the inclusion of web content other than query results.
HTML Template File "EnmBCel2.htx "

The contents of this HTML template file is as follows:
<HTML>
<BODY BGCOLOR=#DCDCDC>
<!--T--><FONT>
<!--T--><TABLE BGCOLOR=#F0F0DD BORDER=2 CELLPADDING=1 CELLSPACING=4>
<!--T--><COL>
<!--T--><THEAD>
<!--T--><TR BGCOLOR=#2F4F4F>
<!--T--><TH><FONT COLOR=#FFFFA0></FONT></TH>
<!--T--></TR>
<!--T--></THEAD>
<!--T--><TBODY>
<!--T--><TR>
<!--T--><TD NOWRAP BGCOLOR=#FFFFFF></TD>
<!--T--><TD NOWRAP BGCOLOR=#FFEBCD></TD>
<!--T--></TR>
<!--T--><TR>
<!--T--><TD NOWRAP BGCOLOR=#FFEBCD></TD>
<!--T--><TD NOWRAP BGCOLOR=#FFFFFF></TD>
<!--T--></TR>
<!--T--></TBODY>
<!--T--></TABLE>
<!--T--></FONT>
</BODY>
</HTML>
This file demonstrates the specification of attributes within the BODY, TABLE, TR and TD tags, the specification of sub-tags within the TH tag, the enumeration of TR tags within the TBODY tag (causes repeating formatting by row), and the enumeration of TD tags within the TBODY-TR tags (causes repeating formatting by column).
|