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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T16:56:57+00:00 2026-06-18T16:56:57+00:00

BLUF: Running AJAX call from Chrome extension isn’t working properly. AJAX: $.ajax({ type: GET,

  • 0

BLUF: Running AJAX call from Chrome extension isn’t working properly.

AJAX:

$.ajax({
    type: "GET",
    url: "http://weather.aero/dataserver_current/httpparam?dataSource=metars&requestType=retrieve&format=xml&stationString=KFBG&hoursBeforeNow=1&fields=raw_text",
    dataType: "xml",
    success: function(xml){
        $(xml).find("raw_text").each(function(){
            var metar = $(this).text();
        });

        $("#ob-body").html(metar);
    }
});

So I’m trying to get weather data from a site that requires a GET to request the data XML. They give tips for building the request string for the URL, and upon pasting the URL in the address bar, the appropriate XML data displays correctly.

Next, I assembled the AJAX call and ran it, but nothing seems to happen. I changed the function for the success property to simply ‘alert()’ and ran the extension again, and the alert box popped up.

The fact that the alert is showing up means that the call was successful, unless i’m totally out to lunch … so why isn’t the original function working? I realize that the code searching the XML might not be right, but placing an alert right before I start dealing with the doc isn’t popping up either, which tells me for some reason it’s not entering the function at all.

  • 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-18T16:56:59+00:00Added an answer on June 18, 2026 at 4:56 pm

    It may because of the Same Origin Policy constraints of the AJAX requests. Chrome allows you to make cross domain ajax request in the extensions but we need to add permissions to the extension manifest file as given in the document

    Looks like you may have to add cross domain access permission to the manifest file like

    {
      "name": "My extension",
      ...
      "permissions": [
        "http://weather.aero/"
      ],
      ...
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

BLUF: Google Analytics iOS v2 beta 4 misses tracking my first UIViewController that is

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.