Advertisement
Adam_Martin

Untitled

May 14th, 2012
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. function createRequestObject() {
  2. if (typeof XMLHttpRequest === 'undefined') {
  3. XMLHttpRequest = function() {
  4. try { return new ActiveXObject("Msxml2.XMLHTTP.6.0"); }
  5. catch(e) {}
  6. try { return new ActiveXObject("Msxml2.XMLHTTP.3.0"); }
  7. catch(e) {}
  8. try { return new ActiveXObject("Msxml2.XMLHTTP"); }
  9. catch(e) {}
  10. try { return new ActiveXObject("Microsoft.XMLHTTP"); }
  11. catch(e) {}
  12. throw new Error("This browser does not support XMLHttpRequest.");
  13. };
  14. }
  15. return new XMLHttpRequest();
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement