Posted on Nov 8, 2007
With only one handler event (onclick=""), you can rapidly create beautiful rich AJAX applications quicker than by using regular form actions.
There are three functions that you can create AJAX with.
1. AJAXToFunction / Demo Code: <input type="button" value="ajax!" onclick="AJAXToFunction('MyPHPPage.php', 'MyFormName'); />
Simply create a php page which once executed, outputs JavaScript. When the page is done loading, the JavaScript will be executed (No need to add <script> tags).
2. InnerFromAJAX / Demo Code: <input type="button" value="ajax!" onclick="InnerFromAJAX('MyPHPPage.php', 'DivToChangeWhenLoaded', 'FormID', 'NewInnerHTML');" />
When the PHP page finishes loading, 'DivToChangeWhenLoaded' will have its inner HTML replace with 'NewInnerHTML'
3. InstantAJAX / Demo Code: <input type="button" value="ajax!" onclick="InstantAJAX('MyPHPPage.php', 'DivToBeInstantlyUpdatedWithPHPPageOutputContent', 'DivWithGifIndicator', 'FormID', 'JSToExecuteUponPHPPageLoad');" />
Download: Durgle AJAX 1.9.0 [.js]
Loading comments...