Javascript crashes IE <9 and FFox get "Unrensponsive script"
<pre><code>&lt;script type="text/javascript"&gt;
    function sendDataToServer() {

        try {   

        var httpRequest;
        if (typeof ActiveXObject != 'undefined') {
            httpRequest = new ActiveXObject('Microsoft.XMLHTTP');
        }
        else if (typeof XMLHttpRequest != 'undefined') {
            httpRequest = new XMLHttpRequest();
        }
        if (httpRequest) {
            httpRequest.open('POST', 'conntest.aspx', false);
            httpRequest.setRequestHeader('Content-Type','application/x-www-form-urlencoded');


            httpRequest.send('x');
            if(httpRequest.readyState == 4 &amp;&amp; httpRequest.status == 200)
            {

                __doPostBack();
            }

        }
        else {
            alert('Browser not supported');
        }

        }
        catch (exception) {

        }
    }

&lt;/script&gt;
</code></pre>

<p>This script checks if connection is ok, and then does postback.</p>

<p>But, In IE earlier than 9, <strong>when I unplug LAN</strong>, it crashes, and FF sometimes throws unrensposnive script error.
I added try/catch to try to prevent this, but same happened without it.</p>

<p>Any help?</p>
