[jQuery] Re: Ajax Setup Questions
I test this code: jQuery.ajaxSetup( error: function(request, settings,ob){ alert( error: );} }) ; Then error message appear always that I do ajax athought ajax call is success. Am I doing something wrong or is a bug? On 2 ago, 03:13, Ganeshji Marwaha [EMAIL PROTECTED] wrote: the function is ajaxError() and not error() -GTG On 8/1/07, oscar esp [EMAIL PROTECTED] wrote: I need to have a global behaviour for ajax call. I have next code: jQuery().ajaxSuccess(function(request, settings){updateCounter ();}); jQuery().error(function(request, settings){alert('APLICATION ERROR\n '+settings.url);}); jQuery.ajaxTimeout(12); - Ajax Success works fine. - I don't know how provoke and error to execute error function Any suggestion? - TimeOut: When time out event is fired, error function should be executed or there is any way to specify which function should be fired? Thanks.- Ocultar texto de la cita - - Mostrar texto de la cita -
[jQuery] Re: Ajax Setup Questions
Oscar, That should not be the case. Your error fn should only be invoked when there is an error. Do you have a sample page we could look at? In your code it looks like you have an extra curly brace and also the arguments passed to the error fn should look like this: jQuery.ajaxSetup( error: function(xhr, status, err){ alert(error: +err);} ); Mike On 8/2/07, oscar esp [EMAIL PROTECTED] wrote: I test this code: jQuery.ajaxSetup( error: function(request, settings,ob){ alert( error: );} }) ; Then error message appear always that I do ajax athought ajax call is success. Am I doing something wrong or is a bug?
[jQuery] Re: Ajax Setup Questions
the function is ajaxError() and not error() -GTG On 8/1/07, oscar esp [EMAIL PROTECTED] wrote: I need to have a global behaviour for ajax call. I have next code: jQuery().ajaxSuccess(function(request, settings){updateCounter ();}); jQuery().error(function(request, settings){alert('APLICATION ERROR\n '+settings.url);}); jQuery.ajaxTimeout(12); - Ajax Success works fine. - I don't know how provoke and error to execute error function Any suggestion? - TimeOut: When time out event is fired, error function should be executed or there is any way to specify which function should be fired? Thanks.