jquery detect ajax request
I Know in jQuery ajax there is tools to detect error but that I want is how to describe what is the problem? 404, no internet connection, internal server error or something else?how to detect jquery ajax request timeout error. One way to try detect an AJAX request (as opposed to a regular page load) is by using the following PHP codeIt works only on JQuery ajax request :) Rangel R Morais. Which Browser/OS and jQuery version are you using? Have you tried using Firebug to check if the X REQUESTEDWITH header is being sent?There isnt any way I know of to detect an AJAX request specifically in this instance (being as this is technically not AJAX) but you can check that For this very reason, a common technique is to detect whether an AJAX request has been made with your server-side language of choice. jQuery makes this ridiculously simple, by setting a header from within the . ajax method. Unfortunately this doesnt apply since it seems the OP isnt using .ajax() or any jQuery ajax method for actually loading content, but leaving it here in case future googlers are doing this. To stop "Potentially Dangerous Request.Form Value Was Detected From The Client". error message I used jQuery.ajax because it silently send the data to server side without refresh. When working with multiple AJAX requests at that time its hard to detect when will be all request is being completed. You can use the setTimout() method which will execute your action after your given time.