Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 212d374c4b
Fetching contributors…

Cannot retrieve contributors at this time

file 49 lines (42 sloc) 1.409 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
<?php
/**
* Example of Using HTML_AJAX_Action
*
* All the work happens in support/testHaa.class.php
* This class just attaches some acctions to calls to the server class
*
* This just shows basic functionality, what were doing isn't actually useful
* For an example on how one would actually use HTML_AJAX_Action check out the guestbook example
*
* @category HTML
* @package AJAX
* @author Joshua Eichorn <josh@bluga.net>
* @copyright 2006 Joshua Eichorn
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @version Release: @package_version@
* @link http://pear.php.net/package/HTML_AJAX
*/
?>

<html>
<head>
<script type='text/javascript' src="auto_server.php?client=all"></script>
<script type='text/javascript' src="auto_server.php?stub=testHaa"></script>

<script type='text/javascript'>
// create our remote object so we can use it elsewhere
var remote = new testHaa({}); // pass in an empty hash so were in async mode
</script>
</head>
<body>

<h1>Basic HTML_AJAX_Action Usage</h1>

<ul>
<li><a href="#" onclick="remote.greenText('target')">Make Target Green</a></li>
<li><a href="#" onclick="remote.highlight('target')">Highlight Target</a></li>
<li><a href="#" onclick="remote.duplicate('target','dest')">Duplicate Target</a></li>
</ul>

<div id="target">
I'm some random text. Ain't I fun.
</div>

<div id="dest">
</div>

</body>
</html>
Something went wrong with that request. Please try again.