Skip to content

Instantly share code, notes, and snippets.

@cfaulkingham
Created June 15, 2010 14:37
Show Gist options
  • Save cfaulkingham/439209 to your computer and use it in GitHub Desktop.
Save cfaulkingham/439209 to your computer and use it in GitHub Desktop.
var httpRequest = new XMLHttpRequest();
httpRequest.open('GET',url,true);
httpRequest.setRequestHeader("Method", "GET " + url + " HTTP/1.1");
httpRequest.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
httpRequest.send(null);
// Register the callback to parseGetLength() when the request is done.
httpRequest.onreadystatechange = function() {
if(httpRequest.readyState == 4){
var returnData = httpRequest.responseText;
parseGetLength(queueIdx,httpRequest.responseText);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment