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)
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)