NAJAX HTML Class.
This class is used to update the content and the style of a page.
Example:
- <?php
- class Update
- {
- function ui()
- {
- sleep(1);
- $content =& NAJAX_HTML::getElementById('content');
- $content->innerHTML = 'Hello World! How are you?';
- }
- }
- define('NAJAX_AUTOHANDLE', true);
- require_once('najax.php');
- ?>
- <?= NAJAX_Utilities::header('.') ?>
- <div id="content">Hello!</div>
- <script type="text/javascript">
- var obj = <?= NAJAX_Client::register(new Update()) ?>;
- obj.ui(najax.asyncCall);
- </script>
Located in /extensions/html/classes/HTML.class.php (line 141)
Adds a given JavaScript code to the output.
Note that you must use the '&' operator in order to get a reference to the script block.
You should add ';' at the end of the script.
Example:
- NAJAX_HTML::addScriptBlock('alert("Hello World!");');
Returns the element whose ID is specified.
Note that you must use the '&' operator in order to get a reference to the element.
Example:
- $content =& NAJAX_HTML::getElementById('content');
Returns an object representing a list of elements of a given name in the document.
Note that you must use the '&' operator in order to get a reference to the list.
Example:
- $messages =& NAJAX_HTML::getElementsByName('message');
Returns an object representing a list of elements of a given tag name in the document.
Note that you must use the '&' operator in order to get a reference to the list.
Example:
- $inputs =& NAJAX_HTML::getElementsByTagName('input');
Imports an associative array to the corresponding form elements.
Example:
- NAJAX_HTML::importForm('mainForm', array('firstName' => 'First', 'lastName' => 'Last'));
Returns the JavaScript code of all DOM elements.
You should not call this method directly.
Documentation generated on Tue, 20 Sep 2005 21:40:04 +0300 by phpDocumentor 1.3.0RC3