473,224 Members | 1,534 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,224 software developers and data experts.

uncaught exception: permission denied to call XmlHttpRequest.open

121 100+
hello

I am using xmlHttpRequest method in my application, this method is giving problem in the following browsers

1) Internet Explorer 7
2) Mozila Firefox(2.0.0.16)

I got solution for Mozilla issue

let me explain what i did

In the about:config (for this we have to open browser and type in the address bar as about:config, after that in filter place type as signed) of mozilla brower
you need to set 'signed.applets.codebase_principal_support' to true and add the line

'netscape.security.PrivilegeManager.enablePrivileg e("UniversalBrowserRead");

in my script(means above xmlHttpRequest.open)

But I am facing this issue in IE7 there i am getting Permission Denied to open xmlHttpRequest.

Anybody knows solution for this problem
Sep 2 '08 #1
8 5234
gits
5,390 Expert Mod 4TB
i guess you want to start a 'cross-domain-request'? it is generally a very! bad idea to rely on settings to a browser-config ... unless it is an intranet application. you may probably find this helpful?

kind regards
Sep 2 '08 #2
sbettadpur
121 100+
hello,

Thanks for ur reply, i saw the url what u provided in the message

and i added the following below lines in my code but its still not working

Expand|Select|Wrap|Line Numbers
  1. var xmlHttp = null;
  2. if (window.XMLHttpRequest) {
  3.   // If IE7, Mozilla, Safari, and so on: Use native object.
  4.   xmlHttp = new XMLHttpRequest();
  5. }
  6. else
  7. {
  8.   if (window.ActiveXObject) {
  9.      // ...otherwise, use the ActiveX control for IE5.x and IE6.
  10.      xmlHttp = new ActiveXObject('MSXML2.XMLHTTP.3.0');
  11.   }
  12. }
  13.  
Is it correct what i am doing please give me solution.

thanks
Sep 5 '08 #3
gits
5,390 Expert Mod 4TB
was i correct with the assumption that you want to make cross-domain requests?
Sep 5 '08 #4
Ferris
101 100+
I quite agree with gits. You probably want to make a cross-domain requests. Could you post more code for detail?
Sep 5 '08 #5
sbettadpur
121 100+
here with i am sending my full source code

Expand|Select|Wrap|Line Numbers
  1. <?php
  2.  
  3. ?>
  4.  
  5. <html>
  6. <head>
  7. <script type="text/javascript" src="config_js_var.js"></script>
  8. <script type='text/javascript'>
  9.  
  10. var xmlHttp
  11.  
  12. function get_username()
  13. {
  14.     xmlHttp=GetXmlHttpObject()
  15.     if (xmlHttp==null)
  16.      {
  17.         alert ("Browser does not support HTTP Request")
  18.          return
  19.      }
  20.     var url=getldap_username_utility_url;
  21.     xmlHttp.onreadystatechange=getusername;
  22.     xmlHttp.open("GET",url,true)
  23.     xmlHttp.send(null)
  24. }
  25. function getusername()
  26. {
  27.     var username;
  28.     if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
  29.     {
  30.          usernamestring=xmlHttp.responseText
  31.  
  32.         userarr = usernamestring.split("<!");
  33.  
  34.         domainusername = userarr[0];
  35.  
  36.         domainuserarr = domainusername.split("\\");
  37.  
  38.         username = domainuserarr[1];
  39.         domain = domainuserarr[0];
  40.         var params;
  41.  
  42.  
  43.  
  44.         params = "user="+username;
  45.  
  46.  
  47.         window.location=feedbackforum_url+"?user="+username+"&domainname="+domain;
  48.     }
  49. }
  50.  
  51.  
  52. function GetXmlHttpObject()
  53. {
  54.     var xmlHttp=null;
  55.     try
  56.      {
  57.          // Firefox, Opera 8.0+, Safari
  58.          xmlHttp=new XMLHttpRequest();
  59.      }
  60.     catch (e)
  61.      {
  62.          //Internet Explorer
  63.          try
  64.           {
  65.               xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  66.           }
  67.          catch (e)
  68.           {
  69.               xmlHttpn=new ActiveXObject("Microsoft.XMLHTTP");
  70.           }
  71.     }
  72.     return xmlHttp;
  73. }
  74.  
  75.  
  76. </script>
  77.  
  78. </head>
  79.  
  80. <body onload='get_username();'>
  81.  
  82. </body>
  83. </html>
Sep 6 '08 #6
Ferris
101 100+
Hi, would you please tell me the value of "getldap_username_utility_url" ?
Sep 6 '08 #7
acoder
16,027 Expert Mod 8TB
You can use a web proxy for cross-domain requests. Another alternative is a dynamic script tag.
Sep 6 '08 #8
acoder
16,027 Expert Mod 8TB
I'll just point out that dynamic script tags are for JavaScript/JSON only, so may not be useful here. One other alternative is Apache's mod_rewrite, if that's possible.
Sep 6 '08 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: dx27s | last post by:
Hi all, I'm working with the XMLHttpRequest object. I receive the following error message: "Permission denied to call method XMLHttpRequest.open" This occurs in Firefox only. IE works fine. ...
1
by: vikas.khengare | last post by:
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...
2
by: laredotornado | last post by:
Hi, I'm trying to use the xmlHttpReq object to contact a URL on my server. But I'm getting a JS "Permission denied" error at the indicated line. What does it mean and how can I get around it? ...
5
by: -Lost | last post by:
Error: uncaught exception: " nsresult: "0x80004001 (NS_ERROR_NOT_IMPLEMENTED)" location: "JS frame :: file:///D:/sites/_test/js/iterate_document.htm :: <TOP_LEVEL:: line 15" data: no] Line 15...
1
by: Charlie | last post by:
I am trying to make an XMLHttpRequest which violates the default "same- origin"policy in Firefox. I checked the archives and found a method that should work but it does not. Below is the test code...
2
by: funktacular | last post by:
Hi - I have some javascript that works when I run it from a server, but I need to run it locally. When I try to execute it locally I get the following error: Error: uncaught exception: Permission...
2
by: johnnyb1726 | last post by:
Can someone please tell me why I get a "Permission denied to call method XMLHttpRequest.open" error? Here is my script: var xmlHttp function runSearch(element){ xmlHttp=GetXmlHttpObject();...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.