Created
August 13, 2016 06:41
-
-
Save viveksinghggits/aedac838bbf66ca5e05ace190ddd04c5 to your computer and use it in GitHub Desktop.
making a cross platform XMLHttpRequest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function createXMLHttpRequestObject(){ | |
if(window.XMLHttpRequest){ | |
xmlHTTPRequest = new XMLHttpRequest(); | |
} | |
else{ | |
xmlHTTPRequest = new ActiveXObject("Microsoft.XMLHTTP"); | |
} | |
return xmlHTTPRequest; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
yes is is beter option I think