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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T22:37:48+00:00 2026-06-02T22:37:48+00:00

After browsing through this site, I found that you can get Yahoo weather in

  • 0

After browsing through this site, I found that you can get Yahoo weather in a JSON format using forecastjson.

When I run:

$.getJSON("http://weather.yahooapis.com/forecastjson?w=2112762724", function(data){
    ...
});

I get the following error:

XMLHttpRequest cannot load http://weather.yahooapis.com/forecastjson?w=2112762724. Origin null is not allowed by Access-Control-Allow-Origin.

I’ve gotten this error before but its normally because I’m trying to load XML cross domain but this is clearly JSON. If you go to the link in the getJSON function, it shows JSON data. Does anyone know why I am getting this error?

Thanks

  • 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-02T22:37:53+00:00Added an answer on June 2, 2026 at 10:37 pm

    Using JSON doesn’t mean that you will not encounter cross domain problem. That is an object standard.

    If you want to make a cross domain request, you should use JSONP.

    The url that you are trying to request, doesn’t support JSONP request. But you can use YQL instead of that.

    here is an example,

    var query = escape('select item from weather.forecast where woeid="2295424"');
    var url = "http://query.yahooapis.com/v1/public/yql?q=" + query + "&format=json&callback=c"; 
    
    $.getJSON(url, function(data) {
       console.log(data);
    });​
    

    And here is the URL that you can check json result.

    DEMO

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

Sidebar

Related Questions

After browsing, I have found that mouse_event(MOUSEEVENTF_WHEEL, 0, 0, 120, 0); is used to
After browsing some old code, I noticed that some classes are defined in this
Browsing through Guava libraries I saw this weird signature on the readLines method of
This should be easy, but after browsing several libraries (jquery preferred!) and even plain
I'm browsing through the code for twitter bootstrap and I've coma across this snippet
I was just browsing through gcc source files. In gcc.c , I found something
After browsing for several hours, I'm completely stumped on how to prevent Windows 7
after browsing the documentation for the sound classes, it seems there is no way
After googling, browsing SO and reading , there doesn't seem to be a Rails-style
After deploying WCF server (svc) on my Server, I have got this message when

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.