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 createRequestOb ject()
{
var request;
var browser = navigator.appNa me;
if (browser == "Microsoft Internet Explorer")
{ request = new ActiveXObject ("Microsoft.XML HTTP"); }
else { request = new XMLHttpRequest (); }
return request;
}
var http = createRequestOb ject();
function sendRequest(Sel ectedServer)
{
var addr = SelectedServer ;
http.open('GET' ,addr,true); // *** ERROR come here
***//
// *** "Permission denied to call method XMLHttpRequest. open" *** //
http.setRequest Header("Content-Type","applicat ion/x-www-form-
urlencoded");
http.onreadysta techange = responseHandleF UN;
http.send(null) ;
}
function responseHandleF UN()
{
if (http.readyStat e == 1)
{document.getEl ementById('dyn_ div').innerHTML = 'Loading...'; }
else if (http.readyStat e == 4)
{ var response = http.responseTe xt;
document.getEle mentById('dyn_d iv').innerHTML = response;}
Best Regards
vikas.khengare@ gmail.com
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 createRequestOb ject()
{
var request;
var browser = navigator.appNa me;
if (browser == "Microsoft Internet Explorer")
{ request = new ActiveXObject ("Microsoft.XML HTTP"); }
else { request = new XMLHttpRequest (); }
return request;
}
var http = createRequestOb ject();
function sendRequest(Sel ectedServer)
{
var addr = SelectedServer ;
http.open('GET' ,addr,true); // *** ERROR come here
***//
// *** "Permission denied to call method XMLHttpRequest. open" *** //
http.setRequest Header("Content-Type","applicat ion/x-www-form-
urlencoded");
http.onreadysta techange = responseHandleF UN;
http.send(null) ;
}
function responseHandleF UN()
{
if (http.readyStat e == 1)
{document.getEl ementById('dyn_ div').innerHTML = 'Loading...'; }
else if (http.readyStat e == 4)
{ var response = http.responseTe xt;
document.getEle mentById('dyn_d iv').innerHTML = response;}
Best Regards
vikas.khengare@ gmail.com
Comment