2

I have a simple enough AJAX 'POST'. It works on IOS phones and tablets (4.0 and 5) and appears to work on Android phones (2.1 and 4.0) but when it is run on two different android tablets both using Honeycomb 3.2 the errorcallback is executed everytime - even though the webservice recieves the post successfully.

      $.ajax({
          type: 'POST',
          url: url,
          cache: false,
          data: data,
          success: callback,
          error:(jqXHR, textStatus, errorThrown) 
          {
            alert(jqXHR); // [object, object]
            alert(textStatus); // "error"
            alert(errorThrown); // empty
          },
          crossDomain:true,  // This option has no effect on the outcome
          dataType: 'JSON'
        });

I am successfully using JQuery's ajax 'GET' across all platforms its just the 'POST' i'm having problem with. CORS is enabled on the server. Anyone come across this problem before? I tried to boot up the emulator to write out the errors but LOG cat just ignored them so I resorted to using alerts.

Interestingly when I navigate away from the page the success callback appears to fire...

4

0 回答 0