Ajax is a key technology of today for creating dynamic websites, web applications.
PlainAjax is a lightweight javascript framework designed to simplify the use of Ajax. It saves the developer from the implementation details and focuses on the most common tasks of an ajax web development.
Each ajax request is a single javascript function call on PlainAjax. On each request, PlainAjax generates the Ajax request- and response processing code on the fly. The web developer no longer needs to deal with Ajax handling and can fully concentrate on the actual functionality of the applications.
| Task | PlainAjax call |
| Send an ajax request | plainajax.request('respurl: serverscript.php;') |
| Displaying response in a html element | plainajax.request('respurl: serverscript.jsp; resultloc: myhtmlelement;') |
| Submitting data from HTML input parameters | plainajax.request('respurl: serverscript.jsp; paramloc: myinputselem;') |
| Passing the Ajax response data to a javascript function | plainajax.request('respurl: serverscript.jsp;', myJavascriptFunction) |
| Displaying a temporary message while waiting for the Ajax response | plainajax.request('respurl: serverscript.jsp; resultloc: myhtmlelement; loadmsg: Loading...') |
| Ask for confirmation before the Ajax request | plainajax.request('respurl: serverscript.php; conftext: Are you sure?') |
Or any combination of the above..
By placing the PlainAjax call to a HTML element's onclick, onmouseover, .. event handler or call it from a javascript. Check out the examples page to see how to put it into practice ..