Monitoring ajax call response

04 / Mar / 2010 by Bhagwat Kumar 2 comments

Recently I have faced a problem of monitoring all the ajax calls. Based on the response from server I have to perform some task depending on the contents of response. If the html response contains some text input field, the first text input field should be automatically focused otherwise leave the response as it is.

Here is the javascript code :

The above trick worked for me and hope it works for you guys too.

Helpful links :-

http://api.jquery.com/ajaxComplete/

Tag -

Ajax jquery
FOUND THIS USEFUL? SHARE IT

comments (2)

  1. Gaurav

    Helped me in implementing the redirect functionality for ajax calls in case of session timeout. Thanks.

    Reply

Leave a comment -