Full version: jsB@nk » » Creating the XMLHTTPRequest Object
URL: https://www.javascriptbank.com/creating-the-xmlhttprequest-object.html
Many browsers allow the XMLHTTPRequest object to be created directly. One method is to use this snippet. It tries all methods of creating the object until it discovers one that works.
Full version: jsB@nk » » Creating the XMLHTTPRequest Object
URL: https://www.javascriptbank.com/creating-the-xmlhttprequest-object.html
<script type=text/javascript>/* This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com*/// Created by: Phil Ballard :: http://www.crackajax.net/try {req = new XMLHttpRequest(); /* e.g. Firefox */} catch(e) { try { req = new ActiveXObject("Msxml2.XMLHTTP"); /* some versions IE */ } catch (e) { try { req = new ActiveXObject("Microsoft.XMLHTTP"); /* some versions IE */ } catch (E) { req = false; } }}</script><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->