Permission denied to call method XMLHttpRequest.open

V

vikas.khengare

Hi Friends....

I have AJAX code which giving "Permission denied to call method
XMLHttpRequest.open" error. This error fired by FireFox 1.0 and IE 6
and with Tomacat 5.x.

This code work very correctly on the other machine and giving correct
output also.

I am trying to fetch "html" pages from others server.
I am not getting any problem for fetching local pages but for other
websites webpages are giving problem.

Here is Code ==>>

function createRequestObject()
{
var request;
var browser = navigator.appName;
if (browser == "Microsoft Internet Explorer")
{ request = new ActiveXObject ("Microsoft.XMLHTTP"); }
else { request = new XMLHttpRequest (); }
return request;
}
var http = createRequestObject();
function sendRequest(SelectedServer)
{
var addr = SelectedServer ;
http.open('GET',addr,true); // *** ERROR come here
***//
// *** "Permission denied to call method XMLHttpRequest.open" *** //

http.setRequestHeader("Content-Type","application/x-www-form-
urlencoded");
http.onreadystatechange = responseHandleFUN;
http.send(null);
}
function responseHandleFUN()
{
if (http.readyState == 1)
{document.getElementById('dyn_div').innerHTML = 'Loading...'; }
else if (http.readyState == 4)
{ var response = http.responseText;
document.getElementById('dyn_div').innerHTML = response;}

Best Regards
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top