469,315 Members | 1,577 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,315 developers. It's quick & easy.

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

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
1 2233

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

Similar topics

4 posts views Thread by JoelWhitehouse | last post: by
3 posts views Thread by Marshall | last post: by
5 posts views Thread by Charlie King | last post: by
reply views Thread by Shinya | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.