AJAX
[ class tree: AJAX ] [ index: AJAX ] [ all elements ]

Source for file haa_usage.php

Documentation is available at haa_usage.php

  1. <?php
  2. /**
  3.  * Example of Using HTML_AJAX_Action see support/testHaa.class.php
  4.  *
  5.  * @category   HTML
  6.  * @package    AJAX
  7.  * @author     Joshua Eichorn <josh@bluga.net>
  8.  * @copyright  2005 Joshua Eichorn
  9.  * @license    http://www.opensource.org/licenses/lgpl-license.php  LGPL
  10.  * @version    Release: @package_version@
  11.  * @link       http://pear.php.net/package/HTML_AJAX
  12.  */
  13.  
  14. // include the helper class
  15. require_once 'HTML/AJAX/Helper.php';
  16.  
  17. // create an instance and set the server url
  18. $ajaxHelper = new HTML_AJAX_Helper();
  19. $ajaxHelper->serverUrl = 'auto_server.php';
  20. $ajaxHelper->jsLibraries[= array('haserializer');
  21. $ajaxHelper->stubs['testHaa';
  22. ?>
  23. <html>
  24. <head>
  25.  
  26. <?php
  27.     echo $ajaxHelper->setupAJAX();
  28.  
  29. ?>
  30. <script type="text/javascript">
  31. var remote = new testHaa();
  32. </script>
  33.  
  34. <style type="text/css">
  35. .test {
  36.     color: red;
  37. }
  38. </style>
  39.  
  40. </head>
  41. <body>
  42.  
  43. <div id="test">
  44. I'm some test content
  45. </div>
  46.  
  47. <ul>
  48.     <li><a href="#" onclick="remote.updateClassName()">Update className</a></li>
  49. </ul>
  50.  
  51. </body>
  52. </html>

Documentation generated on Sat, 05 May 2007 18:00:13 -0400 by phpDocumentor 1.3.0. PEAR Logo Copyright © PHP Group 2004.