jQuery ajaxSuccess

This AjaxEvent ajaxSuccess registers a handler to be executed whenever an Ajax request completes successfully.

Whenever an Ajax request completes successfully, jQuery triggers the ajaxSuccess event. Any and all handlers that have been registered with the .ajaxSuccess() method are executed at this time.

To observe this method in action, do the following Continue reading “jQuery ajaxSuccess”

jQuery ajaxStop

This AJAXEvent ajaxStop registers a handler to be executed when all Ajax requests have completed.

Whenever an Ajax request completes, jQuery checks whether there are any other outstanding Ajax requests. If none remain, jQuery triggers the ajaxStop event. Any and all handlers that have been registered with the .ajaxStop() method are executed at this time. The ajaxStop event is also triggered if the last outstanding Ajax request is cancelled by returning false within the beforeSend callback function. Continue reading “jQuery ajaxStop”

jQuery ajaxStart

This AJAXEvent ajaxStart registers a handler to be executed when the first Ajax request begins.

Whenever an Ajax request is about to be sent, jQuery checks whether there are any other outstanding Ajax requests. If none are in progress, jQuery triggers the ajaxStart event. Any and all handlers that have been registered with the .ajaxStart() method are executed at this time.

To observe this method in action, do the following Continue reading “jQuery ajaxStart”

Username availability check using PHP, AJAX and MySQL

Sometimes we need to check username availability instantly before a user presses the submit button after filling a long-sized signup form. In this case we can use AJAX with any technologies like PHP, Codeigniter, Servlet, Struts, JSF, Spring etc. for checking whether the input username is avaialable or already occupied by someone else. So if we give instant result to the user for username availability then sometimes it makes more sensible than while pressing the submit button and goes top of the signup form to rectify the username input field if input username is not available.

This tutorial shows how to check username availability using PHP, AJAX and MySQL. So after finishing this example you will be able to apply the same logic to any PHP framework or any server side technologies. Continue reading “Username availability check using PHP, AJAX and MySQL”