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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T22:06:54+00:00 2026-06-17T22:06:54+00:00

I am writing a Chrome Extension which needs to load some data from another

  • 0

I am writing a Chrome Extension which needs to load some data from another site. From my research I believe I should use XMLHttpRequest for this but it returns responseText=”” and status=0 for every site that I try. The URLs that I pass into the javascript are good; I have tried

http://www.google.com

and

http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20yahoo.finance.quotes%20where%20symbol%20in%20(%22MSFT%22)&env=store://datatables.org/alltableswithkeys.

Am I doing something ignorant/stupid? I believe that it is something with the permissions in the manifest, but what I have now should allow both of these sites. I see no errors in my javascript console.

The manifest:

{
  "manifest_version": 2,

  "name": "nnnn",
  "description": "nnnn",
  "version": "1.0",

  "browser_action": {
    "default_icon": "icon.png",
    "default_popup": "popup.html"
  },
  "permissions": [
    "storage",
    "http://*.query.yahooapis.com/*",
    "http://*/*",
    "https://*/*"    
  ]
}

The javascript function:

function getSite(queryUrl) {
  var request = new XMLHttpRequest();
  request.open("GET", queryUrl, true);
  console.log(queryUrl);
  request.onreadystatechange = function () {
    console.log(request);
   if (request.readyState == 4) {
      if (request.status == 200) {
        console.log(request.responseText);
      } else {
        console.log('Unable to resolve address');
      }
    }
  };
  request.send(null);
}

EDIT:
http://developer.chrome.com/extensions/xhr.html
This is pretty much what I have been following for guidance but apparently something has gone over my head.

  • 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-06-17T22:06:55+00:00Added an answer on June 17, 2026 at 10:06 pm

    I did something ignorant and had a form submitting which was causing the page to refresh and throw away the previous XMLHttpRequest when it would finish

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

Sidebar

Related Questions

I am writing a Chrome extension which needs to access minus.com by OAuth 2.0.
I am writing codes for a Chrome extension that needs to access minus.com, which
I'm writing a Chrome extension that builds on Gmail and which needs to add
I'm writing a Chrome extension which should apply XSLT transform to certain XML documents
I'm writing a Chrome extension which injects some JS onto a page. My JS
I'm writing a chrome extension which needs to interact with a subtree of bookmarks.
I am thinking of writing an extension for Google Chrome which needs to be
I'm writing a form-filling userscript (for Tampermonkey in Chrome) which should take variables from
I am writing a simple chrome extension which should replace the particular content of
I'm writing a Chrome extension which dynamically changes the content of the popup window

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.