<docbook><section><title>OATDOCbasicoperation</title><para> </para>
<title> OAT Basic Operations</title> OAT Basic Operations
<para>This short document describes what you need to do to include OAT&#39;s features into your web pages.</para>
<itemizedlist mark="bullet" spacing="compact"><listitem>Download the latest release of OAT from <ulink url="http://sourceforge.net/projects/oat">Sourceforge</ulink>.
</listitem>
<listitem>Unpack the archive to some directory.
 There are many files and directories included in the distribution.
 Most of them are applications and/or demos, which are usually not needed </listitem>
<listitem>The only important directory is oat; copy it to your project </listitem>
<listitem>Now you need to include OAT within your page: </listitem>
<listitem>Specify which features you want to load: <programlisting>&lt;script type=&quot;text/javascript&quot;&gt;
var featureList = [&quot;grid&quot;,&quot;pivot&quot;,barchart&quot;];
&lt;script&gt;
</programlisting></listitem>
<listitem>Include loader.js file: <programlisting>&lt;script type=&quot;text/javascript&quot; src=&quot;oat/loader.js&quot;&gt;&lt;/script&gt;
</programlisting></listitem>
<listitem>OAT will take care of internal dependencies and include all needed files.
</listitem>
<listitem>Don&#39;t put anything into the&lt;body onload=...handler; specify a function calledinitinstead - it will be called automatically when OAT finishes loading.</listitem>
</itemizedlist><bridgehead class="http://www.w3.org/1999/xhtml:h2"> Example</bridgehead>
<para>The following example shows how to use OAT to display a date picker.</para>
<programlisting>&lt;html&gt;
&lt;head&gt;
    &lt;script type=&quot;text/javascript&quot;&gt;
        var featureList=[&quot;calendar&quot;];
        function init() {
            var returnedDate = function(date) { alert(&quot;You selected &quot;+date); }
            var calendar = new OAT.Calendar();

            var showCallback = function(event) {
                calendar.show(event.clientX, event.clientY, returnedDate);
            }

            OAT.Event.attach(&quot;button&quot;,&quot;click&quot;,showCallback);
        }
    &lt;/script&gt;
    &lt;script type=&quot;text/javascript&quot; src=&quot;oat/loader.js&quot;&gt;&lt;/script&gt;
    &lt;style type=&quot;text/css&quot;&gt;
        .calendar {
            border: 1px solid #000;
        }

        .calendar_year, .calendar_month {
            text-align: center;
            border-bottom: 1px solid #aaa;
            padding: 2px 0px;
        }

        .calendar table {
            margin-top: 2px;
        }

        .calendar thead {
            font-weight: bold;
        }

        .calendar thead td {
            padding: 0px 2px;
        }

        .calendar td {
            font-size: 60%;
            text-align: center;
        }

        td.calendar_selected {
            background-color: #faa;
        }

        .calendar_special {
            color: #c55;
        }
    &lt;/style&gt;
    &lt;title&gt;OAT Demo&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;input type=&quot;button&quot; id=&quot;button&quot; value=&quot;Pick&quot; /&gt;
&lt;/body&gt;
&lt;/html&gt;
</programlisting><para> <ulink url="CategoryOAT">CategoryOAT</ulink> <ulink url="CategoryOpenSource">CategoryOpenSource</ulink> <ulink url="CategoryDocumentation">CategoryDocumentation</ulink> </para>
</section></docbook>