title: Get json from the server without refreshing the page?
body: <p>I try to make the least request to server, and this is by sending to the client a json file, and then work on this json file,</p>
  
  <p>But, how can I avoid the page from being refreshed? I want that the <code>json</code> get received without the refresh of the page:</p>
  
  <p>Here is my js/python file:</p>
  
  <pre><code>$( document ).ready(function() {
      $("#latlon").on("submit", function(){
          $.ajax({
          type: "post",
          url: "/latlon",
          data: ("#latlon").serialize(),
          contentType: "application/x-www-form-urlencoded",
          success: function(responseData) {
              alert(responseData)
          },
          error: function(jqXHR, textStatus, errorThrown) {
              console.log(errorThrown);
          }
          })
      })
      })
  
  
  class LatLon(MainHandler):
      @tornado.gen.coroutine
      def post(self):
          lat = self.get_argument("lat")
          lon = self.get_argument("lon")
          wwo.request(key=key, q="{},{}".format(lat, lon), format="json", showlocaltime="yes", cc="no", tp=6, extra="isDayTime")
          yield tornado.gen.Task(ioloop.IOLoop.instance().add_timeout, time.time() + 1)
          self.write(json_encode(wwo.result))
  </code></pre>
  
  <p>I am new to Ajax, and everytime I execute this program, I dont even get my <code>alert</code>.
  How do I send the chunk without refreshing the page?</p>
  
  <p>NB: there is the method <code>getJSON</code> but it needs some <strong>Ready json</strong>?</p>