Javascript: Object Expected Error on Auto Complete
<p>I'm getting an Object Expected error on my production server, but not my preview server.  The only difference (to my knowledge) is that my preview server uses an older version of IIS.  But I don't know why it would cause this error?</p>

<p>The error is on this line in my HTML:</p>

<pre><code>&lt;input type="text" id="txt1" onkeyup="showHint(this.value)" name="txtprjName" tabindex="1" size="100" maxlength="50" /&gt;
&lt;span id="txtHint"&gt;&lt;/span&gt; 
</code></pre>

<p>showHint is refering to an external javascript file in the same directory as the HTML file.  </p>

<pre><code>&lt;script language="javascript" type="text/javascript" src="clienthint.js"&gt;&lt;/script&gt;
</code></pre>

<p>And the content of clienthint.js is this:</p>

<pre><code>var xmlHttp
function showHint(str){
    if (str.length==0){ 
        document.getElementById("txtHint").innerHTML="";
        return;
    }
    xmlHttp=GetXmlHttpObject()
    if (xmlHttp==null){
        alert ("Your browser does not support AJAX!");
        return;
    } 
    var url="gethint.asp";
    url=url+"?q="+str;
    url=url+"&amp;sid="+Math.random();
    xmlHttp.onreadystatechange=stateChanged;
    xmlHttp.open("GET",url,true);
    xmlHttp.send(null);
} 
function stateChanged() { 
    if (xmlHttp.readyState==4){ 
        document.getElementById("txtHint").innerHTML=xmlHttp.responseText;
    }
}
function GetXmlHttpObject(){
    var xmlHttp=null    
    try{
        // Internet Explorer
        xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }catch (e){
        try{
            // Internet Explorer
            xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
        }catch (e){
            // Firefox, Opera 8.0+, Safari
            xmlHttp=new XMLHttpRequest();
        }
    }
    return xmlHttp;
}
</code></pre>

<p>Not sure why this isn't working?  Any ideas?  Thanks.</p>
