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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:48:27+00:00 2026-06-09T12:48:27+00:00

The url http://smart-ip.net/geoip-json contains a JSON with data about your geolocation. I want to

  • 0

The url http://smart-ip.net/geoip-json contains a JSON with data about your geolocation.

I want to store that JSON file in JavaScript variables, so I can work with the fields of this JSON.

  • 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-09T12:48:28+00:00Added an answer on June 9, 2026 at 12:48 pm

    It seems a cross-domain request. Directly read the JSON is problematic, but you can use JSONP. Your link supports it. You need something like this:

    <script type="text/javascript">
      function your_callback(data) {
        // do something with data
        alert('City : '+data.city+' Country name : '+data.countryName);
      }
    </script>
    
    <script type="text/javascript" src="http://smart-ip.net/geoip-json?callback=your_callback"></script>​
    

    DEMO.
    `

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

Sidebar

Related Questions

I want to fetch some content from a webserver using Net:HTTP, like this: url
url : http://localhost/back-office/index.php/staff/shopping when i change the category on every onchange event i want
JSFiddle URL: http://jsfiddle.net/sFe45/ Code: <html> <head> <title>Foo</title> <script type=text/javascript> var target; var anchor; function
I need to go to this url: http://autospace.by/download/prices.zip And unzip this file to my
Ruby's Net:HTTP needs to be given a full URL in order for it to
I went to http://www.json.org/js.html and downloaded the json2.js, thinking i'd be fine, afterall that
url: http://www.pagepilot.co.uk/pp_cftest/ When posted into facebook debugger: https://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.pagepilot.co.uk%2Fpp_cftest%2F Keeps returning a 206 Partial Response
URL url = new URL(http://localhost:8080/Work/images/abt.jpg); InputStream in = new BufferedInputStream(url.openStream()); ByteArrayOutputStream out = new
Given: Url - http://www.contoso.com/search.php?q= {param} returns: -html- --body- {...} ---div id='foo'- ----div id='page1'/- ----div
The URL http://www.fourmilab.ch/cgi-bin/Earth shows a live map of the Earth. If I issue this

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.