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

  • Home
  • SEARCH
  • 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 6986325
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:47:41+00:00 2026-05-27T18:47:41+00:00

The data will not display in Chrome, unless i open an IE tab in

  • 0

The data will not display in Chrome, unless i open an IE tab in Chrome go to the site then close it back to Chrome (sorry, if that doesn’t make much sense).

window.onload = function() {
    var url = "http://----.freeiz.com/gbSales/sales.json";
    var request = new XMLHttpRequest();
    request.open("GET", url);
    request.onload = function () {
        if (request.status == 200) {
            updateSales(request.responseText);
        }
    };
    request.send(null);
}
function updateSales(responseText) { 
    var salesDiv = document.getElementById("sales");
    salesDiv.innerHTML = responseText;
}

Im just starting to learn JavaScript so I really don’t know much about it.

  • 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-27T18:47:41+00:00Added an answer on May 27, 2026 at 6:47 pm

    You should use some modern Javascript library. It guards you from many of those small differences between browsers. I like jQuery.

    So, with jquery your code

    window.onload = function() {
      var url = "http://----.freeiz.com/gbSales/sales.json";
      var request = new XMLHttpRequest();
      request.open("GET", url);
      request.onload = function () {
        if (request.status == 200) {
          updateSales(request.responseText);
        }
      };
      request.send(null);
    }
    function updateSales(responseText) { 
      var salesDiv = document.getElementById("sales");
      salesDiv.innerHTML = responseText;
    }
    

    becomes

    $(document).load(function() {
      var url = "http://----.freeiz.com/gbSales/sales.json";
    
      $.get(url, {}, function(data) {
        $('#sales').html(data);
      });
    });
    

    Shorter, cleaner and works in all browsers!

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

Sidebar

Related Questions

I want to display tabular type data, but it will not be coming from
i read that upon session.flush() The data will be synchronized (but not committed) when
I'm creating a application that will fetch data from an SQLite database and display
i just could not figure out how i will put my data on a
Does anyone know why my tabcontrol will not display on this form? Have a
Following s my Code to display data to listview from database. But it will
I will build an C# WPF application that intakes USB/RS232 data (~ rate: 10ms)
I know you should use POST whenever data will be modified on a public
Assume a situation where a data will never be queried directly. AKA, there will
Problem when I enter any input which has underscore (_) data will store to

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.