return false in firefox causing ajax timing issue i'm thinking
<p>I have a simple ajax page that adds 2 numbers.</p>

<p>When I run in IE, the async callback works.</p>

<p>When I run in Firefox it doesn't work.</p>

<p>I get the correct return value in Firebug but lblSum remains blank in Firefox.</p>

<p>It has something to do with the <strong>return false</strong> at the end of the btnAdd click handler.</p>

<p>There is a server-side handler in case Javascript is disabled, so in the Javascript I add a return false.</p>

<pre><code>&lt;script type="text/javascript"&gt;
    var pageWebForm1 = {
        txt1: document.getElementById('TextBox1'),
        txt2: document.getElementById('TextBox2'),
        lblSum: document.getElementById('LblSum'),
        btnAdd: document.getElementById('BtnAdd'),
        init: function() {
            this.btnAdd.onclick = function() {
                var xhr = new XMLHttpRequest();
                xhr.onreadystatechange = function() {
                    if (xhr.readyState == 4 &amp;&amp; xhr.status == 200) {
                        xhrCallback(xhr.responseText);
                    }
                }
                xhr.open("POST", "Handler.ashx", true);
                xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
                xhr.send("x=" + pageWebForm1.txt1.value + "&amp;" + "y=" + pageWebForm1.txt2.value);
                return false;
            }
        }
    }
    pageWebForm1.init();

    function xhrCallback(retval) {
        pageWebForm1.lblSum.innerText = retval;
    }
&lt;/script&gt;
</code></pre>
