Ajax call not working in IE7 and FF
<p>Dear All,
I have one js file with a ajax call which is working fine in IE6, but not in IE7 or FF. Can somebody help?</p>

<pre><code>window.onload = function() {
    var xmlhttp;
    var url = "myurl";
    if (window.XMLHttpRequest) {
        // code for IE7+, Firefox, Chrome, Opera, Safari
        xmlhttp = new XMLHttpRequest();
    }
    else if (window.ActiveXObject) {
    debugger;
    alert("Hello");
        // code for IE6, IE5
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
    else {
        alert("Your browser does not support XMLHTTP!");
    }
    xmlhttp.open("GET", url, true);
    xmlhttp.send(null);
    xmlhttp.onreadystatechange = function() {
        if (xmlhttp.readyState == 4) {
            alert(xmlhttp.responseText);
        }
    }
}
</code></pre>

<p>In IE7 I am getting access denied error. Please help.</p>

<p>EDIT:
I am now trying it using jQuery,
Code:</p>

<pre><code>$(function() {       
        $.ajax(
                    {
                        type: "GET",
                        url: "myurl",
                        datatype: "html",
                        success: function(xhtml) {
                          $("#con").html(xhtml);
                        },
                        error: function() {
                            displayMessage(......);
                        }
                    });
    });
</code></pre>

<p>Still its working in IE6 but not in Others.If its a cross domain issue, then how to solve this?</p>
