Lets just send forms via AJAX and display the result. You need only to set the class to "ajaxForm" to your form-tag and it will work.
Get started by copy this in your head:
window.addEvent('domready', function() {
var mySmartFormObj = new SmartAjaxForm();
});
and add the class "ajaxForm" to your form-tags:
form id="myForm" class="ajaxForm" action="demo.php" method="post"
It is important to make no cross-domain request. So use relative urls in the action attribute.
new SmartAjaxForm([options])
- no Arguments
- regExpClassname: (regexp) To change the CSS class name, for example /^ajaxForm/i -> class='ajaxForm'
- responseClass: (String) CSS class name for the response
- loadingClass: (String) CSS class name for the loading animation
- onClick
- onComplete
- onFailure
Please contact me ([email protected]) if you have any suggestions or comments.