You may use this script in your forms.
Here are some advantages of this script:
1 Page will not be reloaded when user clicks "submit".
2 Your AJAX script exchanges small parts of data with PHP script.
Example of using:
<html>
<body>
//require AJAX script
<script src="ajax.js"></script>
//calling of this function you may assign on "onClick" event for example
doRequest(some_url + params, html_element);
</body>
</html>




