[jQuery] Ajax error handling textStatus

2009-12-09 Thread Cameron van den Bergh
Good day,

When executing an ajax request, i've noticed the following problems :
- the textStatus callback parameter is always set to success ;
- the callback isn't triggered if a download error occurs (404 for
example).

I understand that the second problem might be unsolvable but is there
any way to get the textStatus to work properly or is it still being
worked on ?

Thanks for your help,

Cameron


[jQuery] Ajax error response text

2009-09-01 Thread Reggie Santos

Hi,

I want to ask if there is a way to get the response body of an AJAX
request that resulted in error (406 Not Acceptable). I've been looking
for the response body in the XMLHttpRequest object that is returned
with the error callback but the responseText only contains an empty
string and the responseXML is null. I can see the response body
through Firebug, though.


[jQuery] ajax error handling

2009-06-14 Thread Peter Marino
Hi jQuery,
I'm using the $.ajax method and when this errors I react to the error event
within and dump
the XMLHttpRequest, textStatus, errorThrown to get an idea of what when
wrong... but
the most common message is parse error which doesn't help me that much.

what is going wrong is that on the server side my php file has errors in it
and I would like
to see the errors on the client side.

so basically is there a way to dump the result the server sends back that
$.ajax does not
know how to handle. btw: my $.ajax is setup to use json and this is probably
why it fails...
but I would like to see the result from the server.

is this possible?
anyone?

-- 
Power Tumbling - http://www.powertumbling.dk
OSG-Help - http://osghelp.com


[jQuery] Re: jQuery Ajax Error in Firefox 3.0.8

2009-04-23 Thread Geo..

Sorry Guys
I got the solution by adding data:{}, after the dataType:...

On Apr 23, 9:31 am, Geo.. g...@netbios.in wrote:
 I got the error on Error Stage
 that means the post is not working
 The problem is not in all servers
 for test purposes i just echo a hello world in ajax.php

 On Apr 22, 10:38 pm, Josh Powell seas...@gmail.com wrote:

  what does ajax.php return?

  at what stage is the error, beforesend, error, success, complete?  Put
  in a console.log and see if it is executed in each of the states.

  Just a style suggest, but reverse your usage of quotes:
  $('#searchresult').html('div align=center valign=middle
  style:height:300px;position:fixed;img src=loading.gif /

  nbsp;nbsp;img src=text.gif //div');

  instead of

  $('#searchresult').html(div align='center' valign='middle'
  style:'height:300px;position:fixed;'img src='loading.gif' /

  nbsp;nbsp;img src='text.gif' //div);

  On Apr 22, 6:34 am, Geo.. g...@netbios.in wrote:

   Hi friends
   I tried to develop an ajax request using jQuery
   It works fine with IE and Even Chrome
   But I always getting same error in firefox 411 Length Required On
   firebug
   error shows on jquery.js line no 19

   my code is given below
   $.ajax({
                   type:'POST',
                   url:'ajax.php',
                   dataType:html,
                   cache:false,
                   timeout:1,
                   beforeSend:function(){
                                   $('#searchresult').html(div 
   align='center' valign='middle'
   style:'height:300px;position:fixed;'img src='loading.gif' 
   /nbsp;nbsp;img src='text.gif' //div);

                   },
                   error:function(){
                           $('#searchresult').text(Server Not Responding 
   ,Try again ).show
   ().fadeOut(2000);
                   },
                   success:function(data){
                                   $('#searchresult').html(data);
                   }

   });

   Is there any common error with jquery + firefox + ajax

   I tried versions of jquery 1.2.6 and 1.3.2

   expecting your help

   Geo ..


[jQuery] jQuery Ajax Error in Firefox 3.0.8

2009-04-22 Thread Geo..

Hi friends
I tried to develop an ajax request using jQuery
It works fine with IE and Even Chrome
But I always getting same error in firefox 411 Length Required On
firebug
error shows on jquery.js line no 19

my code is given below
$.ajax({
type:'POST',
url:'ajax.php',
dataType:html,
cache:false,
timeout:1,
beforeSend:function(){
$('#searchresult').html(div align='center' 
valign='middle'
style:'height:300px;position:fixed;'img src='loading.gif' /
nbsp;nbsp;img src='text.gif' //div);
},
error:function(){
$('#searchresult').text(Server Not Responding ,Try 
again ).show
().fadeOut(2000);
},
success:function(data){
$('#searchresult').html(data);
}
});


Is there any common error with jquery + firefox + ajax

I tried versions of jquery 1.2.6 and 1.3.2

expecting your help

Geo ..


[jQuery] Re: jQuery Ajax Error in Firefox 3.0.8

2009-04-22 Thread Josh Powell

what does ajax.php return?

at what stage is the error, beforesend, error, success, complete?  Put
in a console.log and see if it is executed in each of the states.

Just a style suggest, but reverse your usage of quotes:
$('#searchresult').html('div align=center valign=middle
style:height:300px;position:fixed;img src=loading.gif /
nbsp;nbsp;img src=text.gif //div');

instead of

$('#searchresult').html(div align='center' valign='middle'
style:'height:300px;position:fixed;'img src='loading.gif' /
nbsp;nbsp;img src='text.gif' //div);


On Apr 22, 6:34 am, Geo.. g...@netbios.in wrote:
 Hi friends
 I tried to develop an ajax request using jQuery
 It works fine with IE and Even Chrome
 But I always getting same error in firefox 411 Length Required On
 firebug
 error shows on jquery.js line no 19

 my code is given below
 $.ajax({
                 type:'POST',
                 url:'ajax.php',
                 dataType:html,
                 cache:false,
                 timeout:1,
                 beforeSend:function(){
                                 $('#searchresult').html(div align='center' 
 valign='middle'
 style:'height:300px;position:fixed;'img src='loading.gif' 
 /nbsp;nbsp;img src='text.gif' //div);

                 },
                 error:function(){
                         $('#searchresult').text(Server Not Responding ,Try 
 again ).show
 ().fadeOut(2000);
                 },
                 success:function(data){
                                 $('#searchresult').html(data);
                 }

 });

 Is there any common error with jquery + firefox + ajax

 I tried versions of jquery 1.2.6 and 1.3.2

 expecting your help

 Geo ..


[jQuery] Re: jQuery Ajax Error in Firefox 3.0.8

2009-04-22 Thread Geo..

I got the error on Error Stage
that means the post is not working
The problem is not in all servers
for test purposes i just echo a hello world in ajax.php

On Apr 22, 10:38 pm, Josh Powell seas...@gmail.com wrote:
 what does ajax.php return?

 at what stage is the error, beforesend, error, success, complete?  Put
 in a console.log and see if it is executed in each of the states.

 Just a style suggest, but reverse your usage of quotes:
 $('#searchresult').html('div align=center valign=middle
 style:height:300px;position:fixed;img src=loading.gif /

 nbsp;nbsp;img src=text.gif //div');

 instead of

 $('#searchresult').html(div align='center' valign='middle'
 style:'height:300px;position:fixed;'img src='loading.gif' /

 nbsp;nbsp;img src='text.gif' //div);

 On Apr 22, 6:34 am, Geo.. g...@netbios.in wrote:

  Hi friends
  I tried to develop an ajax request using jQuery
  It works fine with IE and Even Chrome
  But I always getting same error in firefox 411 Length Required On
  firebug
  error shows on jquery.js line no 19

  my code is given below
  $.ajax({
                  type:'POST',
                  url:'ajax.php',
                  dataType:html,
                  cache:false,
                  timeout:1,
                  beforeSend:function(){
                                  $('#searchresult').html(div 
  align='center' valign='middle'
  style:'height:300px;position:fixed;'img src='loading.gif' 
  /nbsp;nbsp;img src='text.gif' //div);

                  },
                  error:function(){
                          $('#searchresult').text(Server Not Responding ,Try 
  again ).show
  ().fadeOut(2000);
                  },
                  success:function(data){
                                  $('#searchresult').html(data);
                  }

  });

  Is there any common error with jquery + firefox + ajax

  I tried versions of jquery 1.2.6 and 1.3.2

  expecting your help

  Geo ..


[jQuery] AJAX Error Handling using ajaxSetup

2009-03-17 Thread cfdvlpr

Has anyone used ajaxSetup to log or report AJAX errors?  Would you
care to share how you did this?


[jQuery] ajax error handling troubles

2008-11-16 Thread Davide

$.ajax({
async: true,
url: testingURL,
success: function () {
location.reload();
},
error: function (XMLHttpRequest, textStatus, 
errorThrown) {
console.log('error throw');
console.log(errorThrown);
}
});

the requested page can return  404 or 403 error codes
but the errorThrown variable is ALWAYS undef...
any idea ??


[jQuery] ajax 'error'

2007-09-04 Thread seedy


So I have jQuery talking to some asp.net 1.1 pages through $.ajax.  
There are some situations on the server side(session timeout, access denied)
where I would like to 'cause' an error.  
I could write 'error' to the html and check for it in the success: function,
it would just make more sense to me if all errors were in the error:
callback.

So the question is what can I do from my .net code to cause jquery $.ajax to
run the error callback?



-- 
View this message in context: 
http://www.nabble.com/ajax-%27error%27-tf4379022s15494.html#a12482355
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] .ajax error, error object has responseText.

2007-08-26 Thread Andrew McCloud

I've tried many things to fix this.

In the error alert box I get:
[{id:827,make_id:96,name:tC},
{id:825,make_id:96,name:xA},
{id:826,make_id:96,name:xB},
{id:828,make_id:96,name:xD}]

Which is correct.

$(function(){
$(input.search).keypress(function(){

$(select.make).removeAttr('disabled');
$(button.search).removeAttr('disabled');

});

$(select.make).each(function(i){
$(this).change(function(){

var make_id = $(this).val();
var select_models = $(select.model)[i];

if(make_id  0) {
$.ajax({
type: POST,
url: /request.php,
data: {action: model_list, make_id: 
make_id},
dataType: json,
success: function(models) {
select_models.empty();

$(models).each(function(ii){

select_models.append('option value=' + $(this)['id'] + '' +
$(this)['name'] + '/option');
});


select_models.removeAttr('disabled');
},
error: function(object, msg) {
alert(object.responseText);
}
});
}

});

});
});



[jQuery] AJAX error in IE with jQuery 1.1.3

2007-08-16 Thread Estevão Lucas
Hi,

I would like to know if somebody already had problems with IE when using the
method of ajax with jQuery 1.1.3. The generated error was object does not
support this property or the method and access denied and what was the
solution?

a hug
Estevão Lucas


[jQuery] .ajax error function

2007-08-02 Thread Joe

My .ajax call is erroring out and I can't figure out why.   Was
working fine, and all the sudden quit.

I am looking for an example of the .ajax error function.  Documentaion
says: error (Function) - A function to be called if the request fails.
The function gets passed three arguments: The XMLHttpRequest object, a
string describing the type of error that occurred and an optional
exception object, if one occurred.

I tried:  error: function(request, settings, expobj).  Is that
correct?
expobj=undefined when I display it.
Where can I find a list of errors the .ajax call can return?



[jQuery] AJaX Error

2007-05-03 Thread Rob Wilkerson


I don't think this is jQuery specific, but I'm using jQuery and this
community is helpful as hell, so I thought I'd post to see whether
anyone had any thoughts.  I'm making an AJaX call to a PHP page that
returns a lot of data in JSON format.

1.  The PHP page is doing a lot of work and could take several minutes
(or more) to return the data.
2.  The Apache request timeout is unlimited.
3.  When the error is returned, the exception object's message
property reads: syntax error with no description.
4.  When returning less data (i.e. 3 days rather than 7), the request
is returned just fine.
5.  Firebug indicates that the request never completes.  The
Response tab still says Loading... even after the call has errored
and quit.

The code:

$.ajax ({
type: 'POST',
url: '/reports/_report.php',
dataType: 'json',
data: filter,
global: false,
timeout: 90, // 15 minutes
success: displayReport,
error: function ( request, errtype, e ) {
alert ( 'An error occurred while loading this report. ' + 
e.message
+ '(' + e.description + ')' );
$( '#out-' + report ).empty().append ( 
'strongemError/em/strong' );
},
complete: function() {
$(indicator).css ( 'visibility', 'hidden' );
$(src).css ( 'opacity', '1' ).bind ( 'click', runReport );
}
});

If anyone has any thoughts on what might be happening, I'd really
appreciate it.  I Googled until my fingers bled, but couldn't find
anything that seemed to make a difference.  I'm hoping that maybe I've
just been looking at it for too long and am missing the obvious.

Thanks.

Rob Wilkerson