window.opener.refresh on other domain

J

jan

I know Window.opener.refresh() does not work if two windows are from a
different domain.

Anyone a (javascript)-solution for this problem ?

tks
Jan/
 
E

Erwin Moller

I know Window.opener.refresh() does not work if two windows are from a
different domain.

Anyone a (javascript)-solution for this problem ?

A solution so it will work?
Yes and no.
No as in: Javascript will not have access to another domain.
You cannot 'solve' this, except in broken browsers.

If you really need this, you'll have to use tricks like:
(page1 is in domain 1, page2 in domain2, page2 wants to refresh page1)

1) Make a simple page on the server of page1 (lets name it mustrefresh.php).
This page return only 'refresh' or 'norefresh', depending on some variable
set (via Database eg)
2) Let page2 call some function (script) on its server which sets this
variable so mustrefresh.php will return 'refresh', otherwise it will return
'norefresh'.
3) Let page1 poll (eg check every second) the mustrefresh.php.

You'll have to add a unique value to every visitor to discriminate between
them so mustrefresh.php knows if it must send 'refresh' or 'norefresh'

Which is really all very cumbersome compared to pressing the refresh-button
yourself of course...
My advise would be: just don't, but it can be done. :)

Regards,
Erwin Moller
 
I

ictp

Hi Erwin,

tks for your response but we have to refresh the page :

we can't change page 1 (the one who should be refresh).
this page is the inbox/outbox/view/folder of a users mailbox in Domino
WebAccess.

a user select a mail (or more than one), presses a button, a new window
appear (page 2) were the user can select some options. When the user
press "move", the selected mails will be moved from his/her mailfile to
a notes database. At that moment we have to refresh page 1, because the
mails are disappeared in his/her mailbox.

Notes Mailfiles are on server A, Notes applications are on server B
(all web enabled)
Scripts, windows, pages are all on server 2, because we can not change
the design of the mailfiles.
dnsnames are : mail.servers.ourcompany.com for the mailfiles and
apps.servers.ourcompany.com


please help
 
E

Erwin Moller

ictp said:
Hi Erwin,

tks for your response but we have to refresh the page :

we can't change page 1 (the one who should be refresh).
this page is the inbox/outbox/view/folder of a users mailbox in Domino
WebAccess.

a user select a mail (or more than one), presses a button, a new window
appear (page 2) were the user can select some options. When the user
press "move", the selected mails will be moved from his/her mailfile to
a notes database. At that moment we have to refresh page 1, because the
mails are disappeared in his/her mailbox.

Notes Mailfiles are on server A, Notes applications are on server B
(all web enabled)
Scripts, windows, pages are all on server 2, because we can not change
the design of the mailfiles.
dnsnames are : mail.servers.ourcompany.com for the mailfiles and
apps.servers.ourcompany.com


please help

Hi,

I would like to help you, but I cannot.
Please be aware of the fact that IF crossdomain scripting was allowed (as it
was in the good old days), you would not want to surf the web.
Imagine the possibilities....
In one window you have a site open of www.westeal.com, and in another window
you have opened your online banking interface to your bank.
If www.westeal.com could interact via javascript to the window of your
bankaccount, it could also read the values you type like your username and
password.
You don't want that of course.

I do think however that it should be possible to tell your browser that you
deliberately WANT to domains to interact via javascript, but as far as I
know this is nowhere implemented.

Maybe (I do not know) IE can remove this restriction if you put both sites
in your 'trusted zone'. Not sure.

Hope this sheds some light on the issue. :-/

Good luck!

Regards,
Erwin Moller

PS: If you tested the 'trusted zone' thingy, please tell us your findings.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top