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

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

P: n/a
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).

Sep 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a

"nabilo" <na**************@gmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
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
Sep 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.