Now supports JSON for fast communication!
tppAJAX is a lightweight, yet feature-rich PHP and Ajax toolkit that is compatible with PHP versions 4 and 5 (PHP 5.2 required for JSON).
No need to learn new server side techniques - tppAJAX sends information to your PHP scripts the way you're already used to: using $_GET and $_POST!
And sending a response back to your web page is as simple as using a few tppAJAX PHP functions - full PHP source is provided! More details are available below.
- New feature! Send data back to your script using JSON!
- Built in JSON XSS protection!
- Now Integrated with Scriptaculous! Check out the sortable list demo!
- Works in the newest browsers from Microsoft and Mozilla and in Linux web browsers too!
- tppAJAX supports true form submissions - variables available in $_POST using PHP
- Lightweight easy-to-use PHP code generates output for Ajax interactions
- Architecture encourages business logic to remain on the server not where hackers can see it.
- Multiple connections can be communicating at any one time with connection pooling!
- Actively being developed (I use it in my own projects!) - not some dead-end code
AJAX Username Availability Check
This shows how an AJAX enabled web page might utilize tppAJAX to check for the availability of a particular username. For this simple demo, usernames are stored per browser session. In practice, on a production web site, the example code would actually check a database for the availability. Watch title bar change as you check availability
AJAX Mailing List Signup
This shows how an AJAX enabled web page might utilize tppAJAX to allow a
user to sign up for a mailing list without leaving the page.
This only checks the name, not the email to see if it's already been registered.
Once again, this is only stored for the browser's session.
The client-side API allows you to send simple requests or entire HTML forms to the server invisibly, behind the scenes, without having to refresh the entire page. This is the "magic" of Ajax. This request is sent and the results are received and processed automatically. Multiple connections can be communicating at any one time - tppAJAX utilizes connection pooling.
The server-side is a light-weight PHP solution that allows you to specify three different types of data to send back in response to a request.
- HTML content to be placed into containers specified by ID's in the HTML tags
- Properties to set on the document object
11/7/2008 - Note tppAJAX only supports JSON methods for XHTML documents served as application/xhtml+xml - no automatic content replacement is available due to the way XHTML handles innerHTML
tppAJAX v2.1 - 10/28/2008
Do you have questions regarding this? Ask away!
I love customizing software! Need help integrating this into your site?
Need a different feature? Let me know!