title: Understanding javascript event handling and ajax requests
body: <p>I tried to learn javascript by trying out examples but gave up, because I couldn't understand the idea of event handling and callbacks.</p>
  
  <p>Here is the problem I am trying to solve.
  1. I have a chart (highcharts.js)
  2. I am expecting data from the server
  3. Javascript will make a request to the server for data points
  4. The data has to be appended to the chart</p>
  
  <p>How can I accomplish this? Do you have any book or article that you can recommend? My confusion is mainly, how the callback can update the global objects and in turn cause the elemetns to refresh?</p>