Re: "Object Required" by IE 6 when using Msxml2.XMLHTTP
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: "Object Required" by IE 6 when using Msxml2.XMLHTTP

From: matty <unlimitedbro@gmail.com>
Date: Mon Nov 14 2005 - 04:37:21 CET

You will hate it, but I cut & paste your code and it works without
error in IE6... this is what I copied from Google:

function connect() {
        var C=null;
        try {
                C=new ActiveXObject("Msxml2.XMLHTTP")
        }
        catch(e) {
                try{
                        C=new ActiveXObject("Microsoft.XMLHTTP")
                }
                catch(sc) {
                        C=null
                }
        }
        if(!C && typeof XMLHttpRequest!="undefined") {
                C=new XMLHttpRequest()
        }
        return C;
}

but it looks like your code :( I don't see anything wrong in your code
except that you set http_request to false twice (i would set it to
"null" to start with), and you don't return it. Try my code see if it
works!
Received on Mon Nov 21 03:28:25 2005