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

XMLHttpRequest

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
11 2090


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
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
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
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
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
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
> 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
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
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
> 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
> 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Matt Kruse | last post by:
I'm aware of the circular reference memory leak problem with IE/closures. I'm not sure exactly how to resolve it in this situation. Also, Firefox appears to grow its memory size with the same code....
21
by: Joe Attardi | last post by:
Hey all! I was reading over at the IE Blog the other day http://http://blogs.msdn.com/ie/] and read some interesting, and encouraging news. According to Sunava Dutta, an IE Program Manager,...
13
by: TLaufenberg | last post by:
I'm new to Javascript programming and I've run into a bit of a snag with making an XMLHttpRequest in the Safari browser. Actually, the request doesn't work in Firefox either but only when I use a...
5
by: Peter Michaux | last post by:
Hi, The FAQ correctly says the following: "Mozilla (NN6.2+, Firefox, Ice Weasle etc), Opera 7.6+, Safari1.2+, the Windows version of IE versions 5+, and some other browsers provide the XML...
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...
1
by: geevaa | last post by:
http://www.phpbuilder.com/columns/kassemi20050606.php3 XMLHttpRequest and AJAX for PHP programmers James Kassemi Introduction: Although the concept isn't entirely new, XMLHttpRequest...
1
by: Tarik Monem | last post by:
OK, I'm pretty sure this cannot work because I'm trying to use JavaScript (client-side) to write to an xml file (which is server-side) using XMLHttpRequest. Can I use PHP do what I'm trying to do?...
6
by: Patrick Nolan | last post by:
I'm working on cross-platform portability of some javascript. My Macintosh testing platform is rather old. It has Safari 1.3.2 and Internet Explorer 5.2. I got Safari working, but now IE is...
2
by: Michael Nemtsev [MVP] | last post by:
Hello, In the current application we have several httpmodules to process pages, and we have several pages with calls directly through the XMLHttpRequest. Now the requiremens is to detect the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
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
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
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.