> jQuery.ajax({
> type: 'GET',
> url: "http://picasaweb.google.com/data/feed/base/user/
> picasa_non_esistent_user?kind=album&alt=json",
> dataType: 'jsonp',
> error: function (xhr, ajaxOptions, thrownError) {
> alert("error triggered");
> if
On Dec 15, 3:06 am, MareceK wrote:
> Solution:
>
> error: function (xhr, ajaxOptions, thrownError) {
> if(xhr.status == 404) {
> // 404 error
> }
jQuery.ajax({
type: 'GET',
url: "http://picasaweb.google.com/data/feed/base/user/
picasa_non_esistent_user?kind=album&alt=jso
Solution:
error: function (xhr, ajaxOptions, thrownError) {
if(xhr.status == 404) {
// 404 error
}
else if(xhr.status == 403) {
// 403 error
}
else {
// default error
}
}
On 17. Nov, 03:12 h., Mike Alsup wrote:
> > errorThrown is for JavaScript errors (think try/catch).
> errorThrown is for JavaScript errors (think try/catch). 40X responses
> are not "thrown", they are just errors returned from the server and
> you can get details from the xhr (ie: xhr.statusText).
To elaborate slightly, the server could return an XML document with a
200 status code. But if th
> $.ajax({
> async: true,
> url: testingURL,
> success: function () {
> location.reload();
> },
> error: function (XMLHttpRequest,
The documentation for the ajax error function has this note in the example:
// typically only one of textStatus or errorThrown
// will have info
( http://docs.jquery.com/Ajax/jQuery.ajax#toptions )
Perhaps check the textStatus as well as the errorThrown?
Karl Rudd
On Mon, Nov 17, 2008 at
6 matches
Mail list logo