code: function (xmlHttp, onDone) {
  
      return function () {
          
  		if (xmlHttp.readyState == 4) {
  			
  			if (xmlHttp.status == 200) {
              
  				if (xmlHttp.responseText == "Not found") {
                  	SR.Error('not found');
                  	if (typeof onDone === 'function')
                      	onDone(undefined);
              	}
  				
  				// NOTE: it's possible xmlHttp.responseText is empty
              	else if (xmlHttp.responseText) {
  				
                  	var info = eval ( "(" + xmlHttp.responseText + ")" );
  
  	                // passback the jsonData
      	            if (typeof onDone === 'function')
          	            onDone(info);
              	}               
          	}
  			// return error for other status
  			else {
  				SR.Error('xmlHttp request fail with status: ' + xmlHttp.status);
                  if (typeof onDone === 'function')
                     	onDone(undefined);				
  			}
  		}			
      }
  }
docs: helper HTTP_GET src: http://stackoverflow.com/questions/247483/http-get-request-in-javascript /* sync version
  function httpGet(theUrl) {
  var xmlHttp = null;
  
  xmlHttp = new XMLHttpRequest();
  xmlHttp.open( "GET", theUrl, false );
  xmlHttp.send( null );
  return xmlHttp.responseText;
  }