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

Javascript Page Redirect with I-frames and Popups

P: n/a
Hello,

I've been struggling and trying to work around this for a while and
have even posted on usenet in the past without any working solutions.
I'm posting it again in case someone out there has a solution.

I'm working on a web application with an i-frame in the main
application window. Inside the i-frame are various dynamic links for
opening data entry popups. One of these popups has a couple of i-
frames itself. These i-frames also have dynamic links which execute
scripts to make changes to a server side database.

I need for the main application window to be redirected when a script
is executed in one of the i-frames of the popup data entry window
(when changes are made to the database). So far I've been able to
reload the i-frame in the main application window, but not the main
window itself.

All of the windows, i-frames and scripts are on the same domain and
server.

I would prefer not to use specific window/frame names but to use
relative properties like parent, top, frame[1] etc.

Any help would be greatly appreciated. If more detail is needed,
please let me know.

Thanks,
Raffi

Apr 6 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Raffi wrote:
Hello,

I've been struggling and trying to work around this for a while and
have even posted on usenet in the past without any working solutions.
I'm posting it again in case someone out there has a solution.

I'm working on a web application with an i-frame in the main
application window. Inside the i-frame are various dynamic links for
opening data entry popups. One of these popups has a couple of i-
frames itself. These i-frames also have dynamic links which execute
scripts to make changes to a server side database.

I need for the main application window to be redirected when a script
is executed in one of the i-frames of the popup data entry window
(when changes are made to the database). So far I've been able to
reload the i-frame in the main application window, but not the main
window itself.

All of the windows, i-frames and scripts are on the same domain and
server.

I would prefer not to use specific window/frame names but to use
relative properties like parent, top, frame[1] etc.

Any help would be greatly appreciated. If more detail is needed,
please let me know.

Thanks,
Raffi
Hi Raffi,

I don't know of your previous postings and (failed) experiments, but what is
the problem with constructs like:
parent.location.reload(true);
or
parent.parent.location.reload(true);

or in case you need a new URL:
parent.location.href="somewhere_else.html";

Why doesn't that work in your situation?

Regards,
Erwin Moller
Apr 7 '07 #2

P: n/a
On Apr 7, 2:43 am, Erwin Moller
<since_humans_read_this_I_am_spammed_too_m...@spam yourself.comwrote:
Raffiwrote:
Hello,
I've been struggling and trying to work around this for a while and
have even posted on usenet in the past without any working solutions.
I'm posting it again in case someone out there has a solution.
I'm working on a webapplicationwith ani-framein the main
applicationwindow. Inside thei-frameare variousdynamiclinks for
opening data entry popups. One of these popups has a couple of i-
frames itself. These i-frames also havedynamiclinks which execute
scripts to make changes to a server side database.
I need for the mainapplicationwindow to be redirected when a script
is executed in one of the i-frames of the popup data entry window
(when changes are made to the database). So far I've been able to
reload thei-framein the mainapplicationwindow, but not the main
window itself.
All of the windows, i-frames and scripts are on the same domain and
server.
I would prefer not to use specific window/frame names but to use
relative properties like parent, top, frame[1] etc.
Any help would be greatly appreciated. If more detail is needed,
please let me know.
Thanks,
Raffi

HiRaffi,

I don't know of your previous postings and (failed) experiments, but what is
the problem with constructs like:
parent.location.reload(true);
or
parent.parent.location.reload(true);

or in case you need a new URL:
parent.location.href="somewhere_else.html";

Why doesn't that work in your situation?

Regards,
Erwin Moller- Hide quoted text -

- Show quoted text -
I have found a solution that seems to be working. Opening the window
with parent.openWin(url) where openWin(url) is the window opener
function in the script is causing parent.opener.location to reference
the main application window as the opener of the popup, even though
openWin is being called from the i-frame within the main application
window.

I'm not sure how "proper" this is and whether or not it's a hack, but
it seems to be working equally well for both IE 6 and 7, and Firefox.
Hopefully this message helps others facing this issue as I had seen a
few threads with similar questions and no solution.

Raffi

Apr 9 '07 #3

P: n/a
Hi,

Could you send the code for your function, please? It could be very
useful for me and others.

Apr 20 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.