Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6807845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:52:56+00:00 2026-05-26T19:52:56+00:00

Why jQuery does not raise any error event when I execute following script? thought

  • 0

Why jQuery does not raise any error event when I execute following script?

thought I have registered the error event, but it is not fired.

chrome shows me following error in Network tab in Console.

GET http://www.google.com/adfdaf?callback=jQuery15204572567550931126_1321347602706&_=1321348668347 404 (Not Found)

javascript:

    $.ajax({
        type: "GET",
        url: 'http://google.com/adfdaf?callback=?',
        dataType: "jsonp",
        success: function (msg) {
            console.log('Custom Domain validated successfully.');
        },
        error: function () {
            console.log('Error occured while validating Custom Domain.');
        }
    });
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T19:52:57+00:00Added an answer on May 26, 2026 at 7:52 pm

    The jQuery docs for .ajax state the following:

    error(jqXHR, textStatus, errorThrown)

    A function to be called if the
    request fails. The function receives three arguments: The jqXHR (in
    jQuery 1.4.x, XMLHttpRequest) object, a string describing the type of
    error that occurred and an optional exception object, if one occurred.
    Possible values for the second argument (besides null) are “timeout”,
    “error”, “abort”, and “parsererror”. When an HTTP error occurs,
    errorThrown receives the textual portion of the HTTP status, such as
    “Not Found” or “Internal Server Error.” As of jQuery 1.5, the error
    setting can accept an array of functions. Each function will be called
    in turn. Note: This handler is not called for cross-domain script and
    JSONP requests.

    You can use .getJSON instead. For example:

    $.getJSON("url?callback=?", function() {
        //Success!
    }).error(function() {
        //Error!
    });
    

    Edit

    Looks like that won’t work either. It seems the workaround is to supply a timeout option to .ajax:

    $.ajax({
        type: "GET",
        url: 'http://google.com/adfdaf?callback=?',
        dataType: "jsonp",
        timeout: 5000,
        success: function (msg) {
            console.log('Custom Domain validated successfully.');
        },
        error: function () {
            console.log('Error occured while validating Custom Domain.');
        }
    });
    

    Obviously, that’s not ideal, but the error handler will run after 5 seconds.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following jQuery which does not give the most descriptive error messsages...
I have a problem with Jquery function getJSON, the action url does not trigger
I have a form in a jQuery enabled site. The form does not feature
I am trying to get an element using JQuery's selector, but it does not
jQuery intellisense does not work for me unless I place: <script src=../../Scripts/jquery-1.4.4-vsdoc.js type=text/javascript></script> ...in
For example, the link below triggers something in jQuery but does not go to
Following jQuery does not change the value of defaults or options. The returned value
When I have 2 instances of grid, the jquery does not pick up the
I have the following jquery-code: <script type=text/javascript> $(document).ready(function() { $ ('ul.image-list li:even').addClass ('even'); $
Why this delay of Jquery animation does not work as it should be? $(

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.