title: HTTP GET not getting
body: <p>Trying this but getting nothig</p>
  
  <pre><code>function getWeather() {
  $.ajax({
    type: "GET",
    url: "http://api.openweathermap.org/data/2.5/weather?q=London",
      async: false,
      jsonpCallback: 'jsonCallback',
      contentType: "application/json",
      dataType: 'JSON',
      success: function(data)
      {
          $('#jsonp-results').html(JSON.stringify(data));
      },
      error: function(e)
      {
         alert(e.message);
      }
  
  });
  return data; //The JSON response whould be in this so that I can take this and can do some operation
  }
  </code></pre>
  
  <p>On clicking button it should return the JSON</p>
  
  <pre><code>&lt;body&gt;
  &lt;button onclick="getWeather();"&gt;Get Weather&lt;/button&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>Expected example JSON:</p>
  
  <pre><code>{"coord":{"lon":-0.13,"lat":51.51},"sys":{"type":1,"id":5168,"message":0.0287,"country":"GB","sunrise":1415603442,"sunset":1415636293},"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04d"}],"base":"cmc stations","main":{"temp":284.99,"pressure":1003,"humidity":76,"temp_min":283.75,"temp_max":286.15},"wind":{"speed":5.1,"deg":210},"clouds":{"all":75},"dt":1415624678,"id":2643743,"name":"London","cod":200}
  </code></pre>
  
  <p>I am not getting the mistake I have done.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Tried with this from snippets given here:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;body&gt;
  &lt;p id="temp"&gt;&lt;/p&gt;
  &lt;script src="//code.jquery.com/jquery-1.11.0.min.js"&gt;&lt;/script&gt;
  &lt;script language="javascript" type="text/javascript"&gt;
  function getWeather() {
    data_Json = {};
    $.ajax({
      url: "http://api.openweathermap.org/data/2.5/weather?q=London",
      dataType: 'JSON',
      success: function(data) {
        //alert(JSON.stringify(data));
        data_Json = data;
        //alert("Weather Report: "+data_Json);
      },
      error: function(e) {
        alert(e.message);
      }
    });
    return data_Json;
  }
  
  function temp() {
    //getWeather();
    var obj = JSON.stringify(getWeather());
    //alert("Got"+JSON.stringify(obj));
    //alert(JSON.stringify(getWeather()));
    //document.getElementById("temp").innerHTML = obj.main.temp;
  alert("Temp : "+obj);
    }
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;body&gt;
  &lt;button onclick="getWeather();"&gt;Get Weather&lt;/button&gt;
  &lt;button onclick="temp();"&gt;Temperature&lt;/button&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>It returned <code>{}</code>
  Not returned the JSON (the return defined in getWeather)
  Not the temperature (in get element by id part)</p>