473,412 Members | 4,966 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,412 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 5244
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();...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.