Location: PHPKode > projects > Aukyla Document Management System > doc/html/a00115.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
    <title>Aukyla PHP Framework</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="StyleSheet" href="auton.css" type="text/css" media="screen">
  </head>

  <body>
    <div id="mainmenu">
      <a href="http://www.auton.nl/" class="home">Home</a>
    </div>
    <div id="submenu">
      <a class="logo" href="http://www.auton.nl/"></a>

      <div class="head">Ads</div>
      <a href="http://sourceforge.net/"><img src="http://sourceforge.net/sflogo.php?group_id=116358&amp;type=1" alt="SourceForge.net Logo" style="padding: 2px 4px; width: 88px; height: 31px; border: 0px"></a>
      <a href="http://getfirefox.com/" title="Get Firefox - The Browser, Reloaded."><img src="http://www.mozilla.org/products/firefox/buttons/getfirefox_small.png" alt="Get Firefox" style="width: 110px; height: 32px; border: 0px"></a>
    </div>
    <div id="main">
<!-- Generated by Doxygen 1.3.9.1 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
<h1>JavaScript Class Reference</h1><p>Inheritance diagram for JavaScript:
<p><center><img src="a00115.png" usemap="#JavaScript_map" border="0" alt=""></center>
<map name="JavaScript_map">
<area href="a00166.html" alt="Widget" shape="rect" coords="0,0,73,24">
</map>
<a href="a00044.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
Used to add JavaScript code. 
<p>
This widget shows a JavaScript expression within a proper script block.<p>
You can use the static utility functions <a class="el" href="a00115.html#e0">checkVariables()</a> and <a class="el" href="a00115.html#e1">checkFormFunction()</a> to generate simple JavaScript checks. 
<p>

<p>
Definition at line <a class="el" href="a00218.html#l00036">36</a> of file <a class="el" href="a00218.html">JavaScript.php</a>.<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00115.html#a0">__construct</a> (<a class="el" href="a00096.html">Container</a> $parent, $expression)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00115.html#a1">show</a> ()</td></tr>

<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00115.html#e0">checkVariables</a> ($variables)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00115.html#e1">checkFormFunction</a> ($expressions, $form= '')</td></tr>

</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a0" doxytag="JavaScript::__construct"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">JavaScript::__construct           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a00096.html">Container</a> $&nbsp;</td>
          <td class="mdname" nowrap> <em>parent</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>expression</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Constructor.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>parent</em>&nbsp;</td><td>The parent widget to add this JavaScript block to. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>expression</em>&nbsp;</td><td>The JavaScript expression put in a proper script block.</td></tr>
  </table>
</dl>

<p>
Reimplemented from <a class="el" href="a00166.html#a0">Widget</a>.
<p>
Definition at line <a class="el" href="a00218.html#l00044">44</a> of file <a class="el" href="a00218.html">JavaScript.php</a>.    </td>
  </tr>
</table>
<a class="anchor" name="e1" doxytag="JavaScript::checkFormFunction"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">JavaScript::checkFormFunction           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname" nowrap> <em>expressions</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>form</em> = <code>''</code></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [static]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
This function returns a JavaScript that checks whether a given expression evaluates to true. If the expression is true, the given error message is displayed and the JavaScript function returns <code>false</code>. To make use of this script add <code>onclick="return</code> <code>checkForm$<a class="el" href="a00166.html#a5">form()</a>"</code> to the button that submits the specified form.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>expressions</em>&nbsp;</td><td>An array consisting of <code>expression</code> =&gt; <code>error</code> pairs where <code>expression</code> is the expression that will be checked and <code>error</code> is the error message to be shown if the expression is true. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>form</em>&nbsp;</td><td>Only used to append a form name to the end of the function that is created, so multiple scripts can be inserted. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The generated JavaScript function which checks the specified form.</dd></dl>

<p>
Definition at line <a class="el" href="a00218.html#l00103">103</a> of file <a class="el" href="a00218.html">JavaScript.php</a>.    </td>
  </tr>
</table>
<a class="anchor" name="e0" doxytag="JavaScript::checkVariables"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">JavaScript::checkVariables           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>variables</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [static]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
This function returns the JavaScript code that can be used inside an <code>if-statement</code> to test whether a variable has been filled in.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>variables</em>&nbsp;</td><td>A variabele name, or an array of variable names that will be checked to be empty. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The generated JavaScript statement which checks said the given variables.</dd></dl>

<p>
Definition at line <a class="el" href="a00218.html#l00066">66</a> of file <a class="el" href="a00218.html">JavaScript.php</a>.
<p>
Referenced by <a class="el" href="a00215.html#l00066">Form::show()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="a1" doxytag="JavaScript::show"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">JavaScript::show           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Show the widget.
<p>
Reimplemented from <a class="el" href="a00166.html#a10">Widget</a>.
<p>
Definition at line <a class="el" href="a00218.html#l00050">50</a> of file <a class="el" href="a00218.html">JavaScript.php</a>.
<p>
References <a class="el" href="a00229.html#l00168">Output::write()</a>.    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="a00218.html">JavaScript.php</a></ul>
    </div>
  </body>
</html>
Return current item: Aukyla Document Management System