How to convert HTML Forms into AJAX simply

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

Hello reader,

You may have a normal HTML Form, like: contact form, feedback form or any other forms in your website or any website you work on.
Did you think how difficult converting this FORM into AJAX?

Let me say, it will be very simple. Simple as 1 minute of changes.

How is that, right?
Using the ALAJX (a new jQuery plugin) will make it as simple as that. This plugin deals with forms as the following code:
// OR

The ALAJAX plugin checks the object, if it is not a form then it will look inside the current object for a form. Then it prevent the form from submitting the data (by clicking on Submit button or by pressing Enter) and it sends the data by AJAX to the URL given in action form property. It also use the form method property to send data by POST or GET.

So, there is nothing you are going to do,

  • Include the jQuery plugin in your web page (If its already included then skip this one).
  • Include the ALAJAX plugin.. download it from here. You also may check the demo page of this plugin by clicking here.
  • Call the plugin to enable it. as:  $(document).ready(function (){$("#form_id").alajax();});
  • You may need to do some update to you Server-Side scripting code.

Hope you enjoy it 🙂

By Alaa Badran

Front-End and Web developer


Leave a Reply to toorr2p Cancel reply

Your email address will not be published. Required fields are marked *