How to call a page in a remote site and get the result within your page with javascript

Discussion in 'Javascript' started by nabilo, Sep 23, 2005.

  1. nabilo

    nabilo Guest

    I want to know if it's possible to call, within my cgi page, using
    javascript, a remote url and get the result without changing my actual
    page.
    To say more, I have a page result appaired to the customer. And I want
    to call, during this, a remote server to send the result of the
    operation (ok/nok).
    I don't want to use 'window.open' because it can be blocked by the
    browser (pop-up).
     
    nabilo, Sep 23, 2005
    #1
    1. Advertising

  2. nabilo

    Jim Davis Guest

    "nabilo" <> wrote in message
    news:...
    >I want to know if it's possible to call, within my cgi page, using
    > javascript, a remote url and get the result without changing my actual
    > page.
    > To say more, I have a page result appaired to the customer. And I want
    > to call, during this, a remote server to send the result of the
    > operation (ok/nok).
    > I don't want to use 'window.open' because it can be blocked by the
    > browser (pop-up).


    You're mixing a lot of things together there that cloud the question. I'm
    going to assume that you're talking about client-side script (not
    server-side JavaScript via some CGI process).

    If that's the case then, no - you can't do this in a normal application.
    The browser security model will allow you to open the popup window or
    include a remote page in a frame or iFrame but it will not allow script from
    the two sites to "touch" one another. This would be a big (VERY BIG)
    security issue. It's a no-no.

    That being said you COULD access the remote site from the server-side and
    pass the results to your client-side script (possibly via some AJAX-style
    programming which would allow you to do this without a full-page refresh).

    But there's just no way to do this, legally, with the current browser
    security models (some browsers support reduced security models as options
    like IE's "HTA" container... but they're not very common and would create
    other issues for you).

    Jim Davis
     
    Jim Davis, Sep 23, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. BradM
    Replies:
    2
    Views:
    712
    BradM
    May 30, 2007
  2. davidj411
    Replies:
    7
    Views:
    3,324
    Tim Golden
    Oct 8, 2009
  3. Mark Shapiro
    Replies:
    3
    Views:
    566
    Mark Shapiro
    Oct 8, 2011
  4. Michael Tan
    Replies:
    32
    Views:
    1,025
    Ara.T.Howard
    Jul 21, 2005
  5. ARGENTINA
    Replies:
    4
    Views:
    182
    Joe Smith
    Dec 30, 2004
Loading...

Share This Page