Advertisement
zachdyer

Return XMLHttp Object

Apr 7th, 2013
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var getXMLHttp = function(){
  2.     var xmlhttp;
  3.     if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari
  4.       xmlhttp=new XMLHttpRequest();
  5.     } else {// code for IE6, IE5
  6.       xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  7.     }
  8.     return xmlhttp;
  9. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement