<docbook><section><title>OATDOCanchor</title><para> </para>
<title> anchor.js</title> anchor.js
<para>Enhanced Anchor tag.</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h2"> Functions</bridgehead>
<bridgehead class="http://www.w3.org/1999/xhtml:h3"> OAT.Anchor.assign(anchor, options)</bridgehead>
<para>Modifies anchor element so it acts like Enhanced Anchor: when activated, it displays some additional data in lookup bubble.
 The lookup bubble is an instance of <ulink url="OATDOCwin">OAT.Win</ulink> object - so it can be styled the same way: use predefined OAT.Winstyles or use its own via template.
 Options are the following:</para>
<itemizedlist mark="bullet" spacing="compact"><listitem><computeroutput> <emphasis>href</emphasis></computeroutput>  - String, url of requested data.
 When false,anchor inherits this value from the href attribute.
</listitem>
<listitem><computeroutput> <emphasis>connection</emphasis></computeroutput> - <computeroutput>OAT.Connection</computeroutput> object </listitem>
<listitem><computeroutput> <emphasis>datasource</emphasis></computeroutput> -<computeroutput>OAT.DataSource</computeroutput> object </listitem>
<listitem><computeroutput> *result_control*</computeroutput> - <computeroutput>&quot;grid&quot;</computeroutput>, <computeroutput>&quot;timeline&quot;</computeroutput> or <computeroutput>&quot;form&quot;</computeroutput>.
 Default is grid.
 Use false for common window.
</listitem>
<listitem><computeroutput> <emphasis>content</emphasis></computeroutput> - node to be inserted (for example,<computeroutput>OAT.Dom.text()</computeroutput> can be used for raw text).
</listitem>
<listitem><computeroutput> <emphasis>status</emphasis></computeroutput> - string to be inserted into status line </listitem>
<listitem><computeroutput> <emphasis>title</emphasis></computeroutput> - string to be in the title area of the window </listitem>
<listitem><computeroutput> <emphasis>activation</emphasis></computeroutput> - <computeroutput>&quot;hover&quot;</computeroutput>, <computeroutput>&quot;click&quot;</computeroutput>, <computeroutput>&quot;dblclick&quot;</computeroutput> or <computeroutput>&quot;focus&quot;</computeroutput> </listitem>
<listitem><computeroutput> <emphasis>width</emphasis></computeroutput> ,<computeroutput> <emphasis>height</emphasis></computeroutput> - dimensions of lookup window (false is like &#39;auto&#39; in CSS) </listitem>
<listitem><computeroutput> <emphasis>elm</emphasis></computeroutput> - anchor node (use when other than current) </listitem>
<listitem><computeroutput> <emphasis>newHref</emphasis></computeroutput> - new &#39;href&#39; attribute of theanchor, defaults to &#39;javascript:void(0)&#39; </listitem>
<listitem><computeroutput> <emphasis>type</emphasis></computeroutput> - Window style type (default <computeroutput>OAT.WinData.RECT</computeroutput>).
 (See <ulink url="OATDOCwin">OAT.Win</ulink> for other types.) </listitem>
<listitem><computeroutput> <emphasis>template</emphasis></computeroutput> - custom type data.
 (See <ulink url="OATDOCwin">OAT.Win</ulink> for details.) </listitem>
<listitem><computeroutput> <emphasis>visibleButtons</emphasis></computeroutput> - default &quot;cr&quot;.
 (See <ulink url="OATDOCwin">OAT.Win</ulink> for details.) </listitem>
<listitem><computeroutput> <emphasis>enabledButtons</emphasis></computeroutput> - default &quot;cr&quot;.
 (See <ulink url="OATDOCwin">OAT.Win</ulink>   for details.)</listitem>
</itemizedlist><bridgehead class="http://www.w3.org/1999/xhtml:h3"> OAT.Anchor.close(element, recursive)</bridgehead>
<para>Closes selected a++ window.
 The main point of this method is that it can be called from anywhere, so we do not have to use the close button of the window itself.</para>
<itemizedlist mark="bullet" spacing="compact"><listitem><computeroutput> <emphasis>element</emphasis></computeroutput> - any element inside the a++ or the a++ container itself.
</listitem>
<listitem><computeroutput> <emphasis>recursive</emphasis></computeroutput> - (optional) if the anchor is inside of another window, close all parents recursively.</listitem>
</itemizedlist><bridgehead class="http://www.w3.org/1999/xhtml:h2"> Example</bridgehead>
<programlisting>var options = {
        title:&quot;Title text&quot;,
        content:OAT.Dom.text(&quot;Content text&quot;),
        status:&quot;Status text&quot;,
        result_control:false,
        activation: &quot;hover&quot;,
        type:OAT.WinData.TYPE_MAC
}
OAT.Anchor.assign(&quot;elementID&quot;, options);
</programlisting><para> <ulink url="CategoryDocumentation">CategoryDocumentation</ulink> <ulink url="CategoryOAT">CategoryOAT</ulink> <ulink url="CategoryOpenSource">CategoryOpenSource</ulink></para>
</section></docbook>