473,386 Members | 1,790 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,386 software developers and data experts.

Permission denied to call method XMLHttpRequest.open

Hi.

I'm trying to build a webpage which calls another one (at a
different server) by using:
var req = new XMLHttpRequest()

I know some browsers (Mozilla and IE) doesn't allow it, and
shows this error:
Permission denied to call method XMLHttpRequest.open

Can I solve this issue? Thx.

Jul 25 '05 #1
5 25374


fr**********@usa.com wrote:

I'm trying to build a webpage which calls another one (at a
different server) by using:
var req = new XMLHttpRequest()

I know some browsers (Mozilla and IE) doesn't allow it, and
shows this error:
Permission denied to call method XMLHttpRequest.open

Can I solve this issue? Thx.


IE has different security zones and for each zone you can configure
whether access to data sources from a different server is allowed. So
you would need your users to lower the normal security settings or put
your site in the trusted zone for instance and configure that to allow
such access.
With Mozilla you would need to use signed script and then request the
privilege to access data from a different server, the browser user can
then grant that privilege or not and save that setting.

Or you solve it on your server by setting up a "proxy" script that
fetches the XML from the other servers so that the client-side script
connects to your own server only.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 25 '05 #2
Is it possible to call a page from a different server into an iframe or
something and then getting the document somehow using javascript??

Jul 26 '05 #3
You can load anything you want into an iframe but you are not allowed to
read from it unless the content of the iframe is from the same domain.

-Steffan

in article 11**********************@f14g2000cwb.googlegroups. com,
ca**********@gmail.com at ca**********@gmail.com wrote on 7/25/05 6:49 PM:
Is it possible to call a page from a different server into an iframe or
something and then getting the document somehow using javascript??

Jul 26 '05 #4
Without full knowledge of httprequest() to create signed scripts and
hiding the impact to end users, can you provide more detail on the
proxy script. Also, is this a change to the destination web server,
i.e. one change corrects this for all end users? I'm performing a
httprequest on the same local server but an getting this error message.
It does not appear when I test via localhost in the url.

Jul 30 '05 #5
Sorry, got it. I was using CFAjax and found what the problem was in
their BB.

Jul 30 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

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...
0
by: robi | last post by:
Hello everybody, I am trying to call a webservice which is deployed in Apache axis using AJAX. I am using servlet to forward the request from client to the webservice and to return the response...
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? ...
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...
0
by: wild_bunch | last post by:
bruce barker wrote: i open another page on the same domain as A but i still can't reach permission to change a from it although they are on the same domain... did i got the wrong idea from what...
4
by: MrGado | last post by:
Running on Windows XP with Mozilla 2.0.0.4, I am experiencing a strange security issue. function loadXMLDoc(url,funcname) { try { ...
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();...
8
by: sbettadpur | last post by:
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.