Skip to content

Instantly share code, notes, and snippets.

@mizchi
Created October 9, 2009 13:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mizchi/206024 to your computer and use it in GitHub Desktop.
Save mizchi/206024 to your computer and use it in GitHub Desktop.
var xhr;
function requestFile( data , method , fileName , async ){
xhr = new XMLHttpRequest();
xhr.open( method , fileName , async ) ;
xhr.onreadystatechange = function(){
if (xhr.readyState==4){
//alert("hello!")
}
};
xhr.send( data );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment