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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T18:42:01+00:00 2026-05-24T18:42:01+00:00

If I paste the following URL in a browser tab: https://maps.googleapis.com/maps/api/place/search/json?location=51.5237587%2C-0.1583642&radius=500&types=bar&key=MY_KEY_HERE&sensor=false … I get

  • 0

If I paste the following URL in a browser tab:

https://maps.googleapis.com/maps/api/place/search/json?location=51.5237587%2C-0.1583642&radius=500&types=bar&key=MY_KEY_HERE&sensor=false

… I get the expected JSON response from the Google Places API (MY_KEY_HERE is of course replaced with the actual key, here and in the .ajax() below). However when using this jQuery.ajax() construct:

$.ajax({
     type: 'GET',
     url: "https://maps.googleapis.com/maps/api/place/search/json",
     data: {"location" : latlng, "radius" : 500, "types" : "bar", "key" : "MY_KEY_HERE", "sensor" : "false",},
     dataType: "json",
     success: function(data)
     {
       var pubResults = data; 
     },
     error: function(data)
     {
       alert(JSON.stringify(data));
     },
     complete: function(data)
     {
       initialize($.oneapi.latitude, $.oneapi.longitude, pubResults);
     }
   }); 

…then the success block is not reached, instead the error block outputs:

{"readyState":0,"responseText":"","status":0,"statusText":"error"}

Testing in Firefox 5.01. The Web console confirms that .ajax() is GETting the URL mentioned at the top of this question. Any ideas why the jQuery call to that URL would result in the error, but the same URL pasted into a browser tab results in the expected JSON?

Many thanks for your time!

  • 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-24T18:42:02+00:00Added an answer on May 24, 2026 at 6:42 pm

    This is a cross domain request. Browsers by default block responses from cross domain sites. You need to use jsonp as the datatyoe. Just google the same and you can see how it can be done using the jquery API. Stack overflow has questions around these too.

    Under the same origin policy, a web page served from server1.example.com cannot normally connect to or communicate with a server other than server1.example.com. An exception is the HTML element. Taking advantage of the open policy for elements, some pages use them to retrieve Javascript code that operates on dynamically-generated JSON-formatted data from other origins. This usage pattern is known as JSONP.

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

Sidebar

Related Questions

I am trying to process the following URL via the HttpGet() method: https://graph.facebook.com/search?q=Cafe++Bakery&type=event&access_token=&type=event&access_token=239090718395|lqqOnRWlcJOb3QGp3G4HW2aqhlc .
When you paste the following URL into IE: http://technet.microsoft.com/en-us/sysinternals/bb897434.aspx , the link on the
it works perfectly fine if I paste the following URL directly into my IE
I am using the following cut/paste function to get the URL parameters. function getUrlVars()
Context: ASP.NET MVC 2.0 I want to support URL of following format: wowreforge.com?Exp=220,Hit<461,Mastery>Haste>Crit It
I'm trying to get an HttpRequest to post this URL https://www.iformbuilder.com/exzact/_emptyTable.php?PAGE_ID=1234&TABLE_NAME=table_name_here&USERNAME=yo@yo.com&PASSWORD=What!What ! I've tried
If you paste the following into the url bar in chrome and try to
If you copy and paste the following text in a html page, &#1575;&#1606;&#1608;&#1575;&#1606; you
Make a new AS3 Document in Flash, paste in the following code and run
Can you point out what is wrong in following query? (Please copy and paste

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.