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 6909161
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:39:17+00:00 2026-05-27T08:39:17+00:00

I developed a web application using IE9 and a text editor. It reads a

  • 0

I developed a web application using IE9 and a text editor. It reads a JSON file, then fills some DIV elements according to that file and the logic of the JavaScript and jQuery code. Under IE9, it works perfectly.

Under Chrome, it fails to execute the $.getJSON() statement, so no data is available. Under FireFox, the $.getJSON() statement apparently runs (alert messages testify to this), but it doesn’t read anything.

The JSON file passes JSONLint.

Neither Chrome nor FireFox indicate any errors.

I made a sample file using JSON data from the JSON site, validated it through JSONLint, then ran my code using that file. No difference–Chrome still ignores the $.getJSON() statement.

A relevant section of my code:

    function buildTree(centralID) {
      alert("Can we start, at least?");
     $.getJSON('sample.json', function(data) {
      alert("first success");
      $.each(data.person, function(i, xdata) {

Chrome displays the first alert but not the second.

Any ideas?

  • 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-27T08:39:17+00:00Added an answer on May 27, 2026 at 8:39 am

    You can use the built in error function to display the error and debug it.

    $(document).ready(function(){ // Make sure your jQuery is inside this
    $.getJSON("sample.json", function(data) {
        alert('Point 1 Reached.');
        console.log(data); // Here we log to our console
        $.each(data.feed.entry, function(i, item) {
                 // Do your stuff here
            }); // End of $.each
    
    // Here Success, Completed & Error do something. chained onto $.getJSON
            }).success(function() { alert("success"); })
              .error(function(jqXHR, textStatus, errorThrown) { // Debug the error!!
                        console.log("error " + textStatus);
                        console.log("error throw " + errorThrown);
                        console.log("incoming Text " + jqXHR.responseText);
                    }) // End of .error
              .complete(function() { alert("complete"); });
            });
    }); // End of DOM Ready
    

    This should show you the error in the console window of firefox or chrome (console.log will not work in IE and break the script). To bring up the console window in firefox or chrome press F12. If the JSON is not working, it will show an error which you can debug.


    Update
    Also make sure that this code is in your $(document).ready(). The $.getJSON() might cause unexpected behaviours across browsers if using it otherways.

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

Sidebar

Related Questions

I have developed a web application using Netbeans 6.7 and Ant. The webapp works,
I have a ASP.net 3.5 web application developed in VB.net I am using iTextsharp
I have developed a Web service using WCF Service Application. This service application is
I'm using Rational Application Developer to create some web services. The problem I have
I've developed a web-based mobile application using Jquery Mobile and HTML5. Now, can I
We have a very large enterprise Web application developed using Mojave (MVC) framework in
Can you recommend a simple/best tool for an web application developed using Wicket framework?
I'm developing a web application using asp.net. There is a text box which contains
We currently have a fully developed web forms application, basically its like WordPress using
I have developed an web application using Asp.net ( .Net Framework 3.0). In this

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.