Access to restricted URI denied" code: "1012"
<p>I'm trying to ping a server after an interval using jquery. I found jquery ajax function on internet working for so many people but it throws exception
"Access to restricted URI denied" code: "1012"" in Firefox, Errorcode 0 in IE and 404 Chrome for www.google.com. I don't understand what is the problem. Following is my code.</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;Server availability&lt;/title&gt;
    &lt;script src="http://code.jquery.com/jquery-1.7.1.min.js" type="text/javascript"&gt;&lt;/script&gt;
    &lt;script type="text/javascript"&gt;


        var req = function () {
            count = count + 1;
            var link = $('#testURL').val();
            $.ajax({
                url: testURL,
                success: function () {
                    $('#spnStatus').html($('#spnStatus').html() + '&lt;br/&gt;&lt;br/&gt;' + link + ' Checked ' + count + ' times. Server available');
                },
                error: function (xhr, ajaxOptions, thrownError) {
                    //alert(xhr.status + "\n" + thrownError);

                    $('#spnStatus').html($('#spnStatus').html() + '&lt;br/&gt;&lt;br/&gt;' + link + ' Checked ' + count
                    + ' times. Server not available. Error Code:' + xhr.status + "&lt;br/&gt; Exception:" + thrownError);
                }
            });
            //Call it again.
            setTimeout(function () {
                req();
            }, 5000);
        };
        var count = 0;
        $(document).ready(function () {
            req();
        });

    &lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;input id="testURL" type="text" value="http://www.google.com" /&gt;&lt;br /&gt;
    &lt;span id="spnStatus"&gt;Not checked yet.&lt;/span&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>Thanks in Advance.</p>
