XMLHttpRequest

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • K

    XMLHttpRequest

    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

  • Martin Honnen

    #2
    Re: XMLHttpRequest



    K wrote:
    [color=blue]
    > 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.[/color]

    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

    Comment

    • Dr Clue

      #3
      Re: XMLHttpRequest

      K wrote:[color=blue]
      > 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.[/color]

      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
      --.

      Comment

      • davey_will

        #4
        re:XMLHttpReque st

        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


        Comment

        • Randy Webb

          #5
          Re: XMLHttpRequest

          davey_will said the following on 10/12/2005 9:22 AM:
          [color=blue]
          > Hi Guys new to the forum,[/color]

          A few things:

          What about the girls?
          This is not a "forum". It is Usenet and the comp.lang.javas cript 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.
          [color=blue]
          > 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.[/color]

          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.javas cript 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?

          Comment

          • Paul Cooper

            #6
            Re: XMLHttpRequest

            On Wed, 12 Oct 2005 22:47:22 -0400, Randy Webb
            <HikksNotAtHome @aol.com> wrote:
            [color=blue]
            >davey_will said the following on 10/12/2005 9:22 AM:
            >[color=green]
            >> Hi Guys new to the forum,[/color]
            >
            >A few things:
            >
            >What about the girls?[/color]

            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

            Comment

            • Randy Webb

              #7
              Re: XMLHttpRequest

              Paul Cooper said the following on 10/13/2005 4:10 AM:
              [color=blue]
              > On Wed, 12 Oct 2005 22:47:22 -0400, Randy Webb
              > <HikksNotAtHome @aol.com> wrote:
              >
              >[color=green]
              >>davey_will said the following on 10/12/2005 9:22 AM:
              >>
              >>[color=darkred]
              >>>Hi Guys new to the forum,[/color]
              >>
              >>A few things:
              >>
              >>What about the girls?[/color]
              >
              >
              > 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![/color]

              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.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly

              Comment

              • davey_will

                #8
                Re: XMLHttpRequest

                > Randy Webbwrote:
                davey_will said the following on 10/12/2005 9:22 AM:[color=blue]
                >
                > Hi Guys new to the forum,
                >[/color]
                A few things:

                What about the girls?
                This is not a "forum". It is Usenet and the comp.lang.javas cript
                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.
                [color=blue]
                > 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[/color]
                the[color=blue]
                > 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.
                >[/color]
                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.javas cript 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:22c736f7c f]

                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.


                Comment

                • Randy Webb

                  #9
                  Re: XMLHttpRequest

                  davey_will said the following on 10/13/2005 9:21 AM:
                  [color=blue]
                  > Sorry if it was offensive to use the term 'hiya guys' it was meant as
                  > a general term to everyone.[/color]

                  No offense, my response was a tongue-in-cheek response.
                  [color=blue]
                  > 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.[/color]

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

                  --
                  Randy
                  comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly

                  Comment

                  • Dr Clue

                    #10
                    Re: XMLHttpRequest

                    davey_will wrote:[color=blue]
                    > 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.
                    >[/color]

                    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
                    --.

                    Comment

                    • davey_will

                      #11
                      Re: XMLHttpRequest

                      > Randy Webbwrote:
                      davey_will said the following on 10/13/2005 9:21 AM:[color=blue]
                      >
                      > Sorry if it was offensive to use the term 'hiya guys' it was meant[/color]
                      as[color=blue]
                      > a general term to everyone.
                      >[/color]
                      No offense, my response was a tongue-in-cheek response.
                      [color=blue]
                      > I am new to web programming however the only problem I have is the
                      > XMLHttpRequest going across domains is not allowed due to the[/color]
                      setting[color=blue]
                      > in IE, I noticed Dr Clue had done a CGI Script to do this and was
                      > looking for some help.
                      >[/color]
                      And there are better (more widely supported) methods of doing anything

                      like that in a browser than the XMLHttpRequest Object.

                      --
                      Randy
                      comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup
                      weekly[/quote:2f0bd9d8f e]

                      :-) 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.


                      Comment

                      • davey_will

                        #12
                        Re: XMLHttpRequest

                        > Dr Cluewrote:
                        davey_will wrote:[color=blue]
                        > Hi Guys new to the forum, Dr Clue would that cgi you wrote work on[/color]
                        a[color=blue]
                        > 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.
                        >
                        >[/color]
                        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:81c18b02c f]

                        Could you send me the information I need to do this, directories etc
                        that need downloading, that would be a great help.


                        Comment

                        Working...