By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,101 Members | 1,335 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,101 IT Pros & Developers. It's quick & easy.

XMLHttpRequest

P: n/a
K
Hey Guys,

The problem i'm having is that our company is provided with a xml link.
My job is to create a javascript menu based on the information
retrieved from that link. We/I do not have access to MainServer1 as it
belongs to another company whoe provides us with the data. The issue
here is that the xml link and the XMLHttpRequest will not/dont sit on
the same server/domain.

MainServer1 ---- Server2 ---- Client

MainServer1 contains all the data/xml feed.
Server2 needs to connect to Server1 to build the relevant javascript
menu, which in turn is used by the client. so when the client clicks on
a menu link, the menu should then trigger a XMLHttpRequest which
connects to MainServer1 to get the data.

I can't seem to find a suitable work around, the error is "Permission
denied to call XMLHttpRequest.open".
Please note that could be "multiple Servers" that connect to
MainServer1 with their own javascript menus.

Does anybody out there have any solutions to this problem.
And oh yeah, the solution should be for both mozilla and ie.
All Help will be appreciated.

Thanks
Krishan

Oct 3 '05 #1
Share this Question
Share on Google+
11 Replies


P: n/a


K wrote:
The problem i'm having is that our company is provided with a xml link.
My job is to create a javascript menu based on the information
retrieved from that link. We/I do not have access to MainServer1 as it
belongs to another company whoe provides us with the data. The issue
here is that the xml link and the XMLHttpRequest will not/dont sit on
the same server/domain.

MainServer1 ---- Server2 ---- Client

MainServer1 contains all the data/xml feed.


Then use server-side programming on Server2 to fetch the XML from
MainServer1. If the Client is a browser rendering a HTML document loaded
from Server2 then script in the HTML document can only connect to
Server2, any connection to MainServer1 to fetch XML has to be done
server-side on Server2.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Oct 3 '05 #2

P: n/a
K wrote:
Hey Guys,

The problem i'm having is that our company is provided with a xml link.
My job is to create a javascript menu based on the information
retrieved from that link. We/I do not have access to MainServer1 as it
belongs to another company whoe provides us with the data. The issue
here is that the xml link and the XMLHttpRequest will not/dont sit on
the same server/domain.


I use a small C++ cgi I wrote F1XMLrelay.cgi so that all
my XML scripts can call it with the destination and a query
and the cgi performs the actual request, being as there is no
cross-domain limitation for the server .cgi The data
is then returned as if it came from my server.

There are probably plenty of proxy/relay programs for http
and there is sure to be one for your platform.
Mine is for unix flavors, although I do run it
on my windows box via a unix emulator

--=<> Dr. Clue (A.K.A. Ian A. Storms) <>=-- C++,HTML, CSS,Javascript
--=<> Internet Programming since 1994 <>=-- DHTML NSAPI TCP/IP
--=<> http://resume.drclue.net <>=-- AJAX, SOAP, XML, HTTP
--=<> http://www.drclue.net <>=-- SERVLETS,TCP/IP, SQL
--.
Oct 3 '05 #3

P: n/a
Hi Guys new to the forum, Dr Clue would that cgi you wrote work on a
linux system, currently looking at send xml data to a payment
processing website but get the same error as Krishan as using
Javascript to and XMLHttpRequest to contact the remote server. How
can the script be implimented? I'm very new to web programming.

Many thanks for any help

Dave
Oct 12 '05 #4

P: n/a
davey_will said the following on 10/12/2005 9:22 AM:
Hi Guys new to the forum,
A few things:

What about the girls?
This is not a "forum". It is Usenet and the comp.lang.javascript Usenet
Group.

Its FAQ is linked to below in my signature. It covers the aspect of
quoting what you are replying to.

It is *NOT* a "forum" that is owned or operated by www.devplug.com.

You need to ditch that crappy site, get a decent newsreader, and
subscribe to Usenet.
Dr Clue would that cgi you wrote work on a linux system, currently
looking at send xml data to a payment processing website but get the
same error as Krishan as using Javascript to and XMLHttpRequest to
contact the remote server. How can the script be implimented? I'm
very new to web programming.


You are "very new to web programming" and yet you want to try to
implement a JS driven payment processing website? You need to learn the
basics of HTML and JS first.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Answer:It destroys the order of the conversation
Question: Why?
Answer: Top-Posting.
Question: Whats the most annoying thing on Usenet?
Oct 13 '05 #5

P: n/a
On Wed, 12 Oct 2005 22:47:22 -0400, Randy Webb
<Hi************@aol.com> wrote:
davey_will said the following on 10/12/2005 9:22 AM:
Hi Guys new to the forum,


A few things:

What about the girls?


I don't know about world-wide usage but in most places I know "guys"
is used as a unisex term. I happily call "Hi Guys" to a mixed group. I
am British; the same usage seems to be prevalent amongst colleagues in
the USA.

Otherwise, I agree!

Paul
Oct 13 '05 #6

P: n/a
Paul Cooper said the following on 10/13/2005 4:10 AM:
On Wed, 12 Oct 2005 22:47:22 -0400, Randy Webb
<Hi************@aol.com> wrote:

davey_will said the following on 10/12/2005 9:22 AM:

Hi Guys new to the forum,


A few things:

What about the girls?

I don't know about world-wide usage but in most places I know "guys"
is used as a unisex term. I happily call "Hi Guys" to a mixed group. I
am British; the same usage seems to be prevalent amongst colleagues in
the USA.

Otherwise, I agree!


I have heard it used in that context as well. But in North Florida in
the USA, it's a slap in the face to the politically correct female
gender to be called a Guy so it's frowned upon. Go figure :)

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Oct 13 '05 #7

P: n/a
> Randy Webbwrote:
davey_will said the following on 10/12/2005 9:22 AM:

Hi Guys new to the forum,
A few things:

What about the girls?
This is not a "forum". It is Usenet and the comp.lang.javascript
Usenet
Group.

Its FAQ is linked to below in my signature. It covers the aspect of
quoting what you are replying to.

It is *NOT* a "forum" that is owned or operated by www.devplug.com.

You need to ditch that crappy site, get a decent newsreader, and
subscribe to Usenet.
Dr Clue would that cgi you wrote work on a linux system, currently
looking at send xml data to a payment processing website but get the same error as Krishan as using Javascript to and XMLHttpRequest to
contact the remote server. How can the script be implimented? I'm
very new to web programming.

You are "very new to web programming" and yet you want to try to
implement a JS driven payment processing website? You need to learn
the
basics of HTML and JS first.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup
weekly
Answer:It destroys the order of the conversation
Question: Why?
Answer: Top-Posting.
Question: Whats the most annoying thing on Usenet?[/quote:22c736f7cf]

Sorry if it was offensive to use the term 'hiya guys' it was meant as
a general term to everyone.

I am new to web programming however the only problem I have is the
XMLHttpRequest going across domains is not allowed due to the setting
in IE, I noticed Dr Clue had done a CGI Script to do this and was
looking for some help.
Oct 13 '05 #8

P: n/a
davey_will said the following on 10/13/2005 9:21 AM:
Sorry if it was offensive to use the term 'hiya guys' it was meant as
a general term to everyone.
No offense, my response was a tongue-in-cheek response.
I am new to web programming however the only problem I have is the
XMLHttpRequest going across domains is not allowed due to the setting
in IE, I noticed Dr Clue had done a CGI Script to do this and was
looking for some help.


And there are better (more widely supported) methods of doing anything
like that in a browser than the XMLHttpRequest Object.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Oct 14 '05 #9

P: n/a
davey_will wrote:
Hi Guys new to the forum, Dr Clue would that cgi you wrote work on a
linux system, currently looking at send xml data to a payment
processing website but get the same error as Krishan as using
Javascript to and XMLHttpRequest to contact the remote server. How
can the script be implimented? I'm very new to web programming.


The code was written for a *nix system, and I run it both on linux ,
as well as on my windows box (via cygwin [ a linux emulator ])

These little http proxies have got to be a dime a dozen,
it only took me maybe two hours tops to write a fairly generic one.

If you wanted to implement one of my relays , you'd have to download
several directories from my src code piles , and do a make.

--
--.
--=<> Dr. Clue (A.K.A. Ian A. Storms) <>=-- C++,HTML, CSS,Javascript
--=<> Internet Programming since 1994 <>=-- DHTML NSAPI TCP/IP
--=<> http://resume.drclue.net <>=-- AJAX, SOAP, XML, HTTP
--=<> http://www.drclue.net <>=-- SERVLETS,TCP/IP, SQL
--.
Oct 14 '05 #10

P: n/a
> Randy Webbwrote:
davey_will said the following on 10/13/2005 9:21 AM:

Sorry if it was offensive to use the term 'hiya guys' it was meant as a general term to everyone.
No offense, my response was a tongue-in-cheek response.
I am new to web programming however the only problem I have is the
XMLHttpRequest going across domains is not allowed due to the setting in IE, I noticed Dr Clue had done a CGI Script to do this and was
looking for some help.

And there are better (more widely supported) methods of doing anything

like that in a browser than the XMLHttpRequest Object.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup
weekly[/quote:2f0bd9d8fe]

:-) was thinking it might have been tongue-in-cheek afterwards.

Think I'll have to take a look into doing it without using
XMLHttpRequest, it's some work i've had to pick up from a colleague
so was trying to leave it as is as much as possible with only knowing
basics of web programming. Many thanks anyhows.
Oct 14 '05 #11

P: n/a
> Dr Cluewrote:
davey_will wrote:
Hi Guys new to the forum, Dr Clue would that cgi you wrote work on a linux system, currently looking at send xml data to a payment
processing website but get the same error as Krishan as using
Javascript to and XMLHttpRequest to contact the remote server. How
can the script be implimented? I'm very new to web programming.

The code was written for a *nix system, and I run it both on linux ,
as well as on my windows box (via cygwin [ a linux emulator ])

These little http proxies have got to be a dime a dozen,
it only took me maybe two hours tops to write a fairly generic one.

If you wanted to implement one of my relays , you'd have to download
several directories from my src code piles , and do a make.

--
--.
--=<> Dr. Clue (A.K.A. Ian A. Storms) <>=-- C++,HTML,
CSS,Javascript
--=<> Internet Programming since 1994 <>=-- DHTML NSAPI
TCP/IP
--=<> http://resume.drclue.net <>=-- AJAX, SOAP, XML,
HTTP
--=<> http://www.drclue.net <>=-- SERVLETS,TCP/IP, SQL
--.[/quote:81c18b02cf]

Could you send me the information I need to do this, directories etc
that need downloading, that would be a great help.
Oct 14 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.