Add something new to Virb:

Virb

Are you sure you want to delete that?

or Cancel

 

Posted on Nov 8, 2007

Extremely Simple AJAX Library

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...

Likes

Details

Viewed 24 times

© 2007 Durgle

virb.com/t/312831
tweet!

Flag this text post!

Flag this text post as:

or Cancel

 

Advertisement

Flag this profile!

Flag this profile as:

or Cancel