That's correct, ajaxSetup only sets the defaults for every ajax call.
Use ajaxSuccess instead:
$().ajaxSuccess(function(){
//...
});
http://docs.jquery.com/Ajax/ajaxSuccess#callback
cheers,
- ricardo
On Mar 2, 12:08 pm, creemorian wrote:
> You're right, this what I'm doing ... I'm afraid I
> So it appears that $.ajaxSetup's success method is a fallback
I think that's correct, although the docs need some clarification on
that.
> Is there a way to define my desired actions without having to place
> the function in every callback function?
Try ajaxSuccess, the global ajax event:
ht
You're right, this what I'm doing ... I'm afraid I had some
grammatical errors in my previous post.
I'm sending an appropriate response from the server but what I'm
trying to do is check for this response on a global basis using the
$.ajaxSetup() function.
Unfortunately the ajaxSetup's success()
Since the session check is done server-side, you can do it with every
AJAX request server-side. If their session is not active anymore,
return a specific status for it. It's good to use JSON response for
this so you can return several sets of data, such as statuses, data,
etc.
On Feb 27, 12:45 pm
4 matches
Mail list logo