function makeRequest(url, callback) {

  // The JSON file that is loaded should be an array of PageInfo:
  var searchDataRequest = new XMLHttpRequest();
  searchDataRequest.onload = function() {
    callback(JSON.parse(this.responseText));
  };
  searchDataRequest.open('GET', url);
  searchDataRequest.send();
}
function makeRequest(url, callback) {

  // The JSON file that is loaded should be an array of PageInfo:
  var searchDataRequest = new XMLHttpRequest();
  searchDataRequest.onload = function() {
    callback(JSON.parse(this.responseText));
  };
  searchDataRequest.open('GET', url);
  searchDataRequest.send();
}
function makeRequest ( url , callback ) { // The JSON file that is loaded should be an array of PageInfo: var searchDataRequest = new XMLHttpRequest ( ) ; searchDataRequest . onload = function ( ) { callback ( JSON . parse ( this . responseText ) ) ; } ; searchDataRequest . open ( 'GET' , url ) ; searchDataRequest . send ( ) ; }
Use XHR to make a request to the server
Use XHR to make a request to the server
Make a request to the specified URL