Skip to content

BMo-design/SmartAjaxForm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SmartAjaxForm

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.

Screenshot

How to use

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.

Syntax

new SmartAjaxForm([options])

Arguments

  • no Arguments

Options

  • 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

Events

  • onClick
  • onComplete
  • onFailure

Contact

Please contact me (info@BMo-design.de) if you have any suggestions or comments.