New Formatting for XMLHttpRequest
Recently I decided to try reducing the size of hacking the HTTP request for cross browser support in AJAX. This little snippet has been tested and is working.
// new xml http object
var xmlHttp = new XMLHttpRequest() ? new XMLHttpRequest() :
( new ActiveXObject(“Msxml2.XMLHTTP”) ? new ActiveXObject(“Msxml2.XMLHTTP”) :
( new ActiveXObject(“Microsoft.XMLHTTP”) ? new ActiveXObject(“Microsoft.XMLHTTP”) : null ) );