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
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
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 - var xmlHttp = null;
-
if (window.XMLHttpRequest) {
-
// If IE7, Mozilla, Safari, and so on: Use native object.
-
xmlHttp = new XMLHttpRequest();
-
}
-
else
-
{
-
if (window.ActiveXObject) {
-
// ...otherwise, use the ActiveX control for IE5.x and IE6.
-
xmlHttp = new ActiveXObject('MSXML2.XMLHTTP.3.0');
-
}
-
}
-
Is it correct what i am doing please give me solution.
thanks
gits 5,390
Expert Mod 4TB
was i correct with the assumption that you want to make cross-domain requests?
I quite agree with gits. You probably want to make a cross-domain requests. Could you post more code for detail?
here with i am sending my full source code - <?php
-
-
?>
-
-
<html>
-
<head>
-
<script type="text/javascript" src="config_js_var.js"></script>
-
<script type='text/javascript'>
-
-
var xmlHttp
-
-
function get_username()
-
{
-
xmlHttp=GetXmlHttpObject()
-
if (xmlHttp==null)
-
{
-
alert ("Browser does not support HTTP Request")
-
return
-
}
-
var url=getldap_username_utility_url;
-
xmlHttp.onreadystatechange=getusername;
-
xmlHttp.open("GET",url,true)
-
xmlHttp.send(null)
-
}
-
function getusername()
-
{
-
var username;
-
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
-
{
-
usernamestring=xmlHttp.responseText
-
-
userarr = usernamestring.split("<!");
-
-
domainusername = userarr[0];
-
-
domainuserarr = domainusername.split("\\");
-
-
username = domainuserarr[1];
-
domain = domainuserarr[0];
-
var params;
-
-
-
-
params = "user="+username;
-
-
-
window.location=feedbackforum_url+"?user="+username+"&domainname="+domain;
-
}
-
}
-
-
-
function GetXmlHttpObject()
-
{
-
var xmlHttp=null;
-
try
-
{
-
// Firefox, Opera 8.0+, Safari
-
xmlHttp=new XMLHttpRequest();
-
}
-
catch (e)
-
{
-
//Internet Explorer
-
try
-
{
-
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
-
}
-
catch (e)
-
{
-
xmlHttpn=new ActiveXObject("Microsoft.XMLHTTP");
-
}
-
}
-
return xmlHttp;
-
}
-
-
-
</script>
-
-
</head>
-
-
<body onload='get_username();'>
-
-
</body>
-
</html>
Hi, would you please tell me the value of "getldap_username_utility_url" ?
You can use a web proxy for cross-domain requests. Another alternative is a dynamic script tag.
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.
Sign in to post your reply or Sign up for a free account.
Similar topics
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.
...
|
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...
|
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?
...
|
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...
|
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...
|
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...
|
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();...
|
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
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
| |