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

Source for file action_usage.php

Documentation is available at action_usage.php

  1. <?php
  2. /**
  3.  * Example of Using HTML_AJAX_Action
  4.  *
  5.  * All the work happens in support/testHaa.class.php
  6.  * This class just attaches some acctions to calls to the server class
  7.  *
  8.  * This just shows basic functionality, what were doing isn't actually useful
  9.  * For an example on how one would actually use HTML_AJAX_Action check out the guestbook example
  10.  *
  11.  * @category   HTML
  12.  * @package    AJAX
  13.  * @author     Joshua Eichorn <josh@bluga.net>
  14.  * @copyright  2006 Joshua Eichorn
  15.  * @license    http://www.opensource.org/licenses/lgpl-license.php  LGPL
  16.  * @version    Release: @package_version@
  17.  * @link       http://pear.php.net/package/HTML_AJAX
  18.  */
  19. ?>
  20.  
  21. <html>
  22. <head>
  23. <script type='text/javascript' src="auto_server.php?client=all"></script>
  24. <script type='text/javascript' src="auto_server.php?stub=testHaa"></script>
  25.  
  26. <script type='text/javascript'>
  27. // create our remote object so we can use it elsewhere
  28. var remote = new testHaa({}); // pass in an empty hash so were in async mode
  29. </script>
  30. </head>
  31. <body>
  32.  
  33. <h1>Basic HTML_AJAX_Action Usage</h1>
  34.  
  35. <ul>
  36.     <li><a href="#" onclick="remote.greenText('target')">Make Target Green</a></li>
  37.     <li><a href="#" onclick="remote.highlight('target')">Highlight Target</a></li>
  38.     <li><a href="#" onclick="remote.duplicate('target','dest')">Duplicate Target</a></li>
  39. </ul>
  40.  
  41. <div id="target">
  42. I'm some random text.  Ain't I fun.
  43. </div>
  44.  
  45. <div id="dest">
  46. </div>
  47.  
  48. </body>
  49. </html>

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