Javascript Page Redirect with I-frames and Popups

R

Raffi

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
 
E

Erwin Moller

Raffi said:
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
 
R

Raffi

Raffiwrote:
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
 
R

rembiszm

Hi,

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

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

No members online now.

Forum statistics

Threads
473,983
Messages
2,570,187
Members
46,747
Latest member
jojoBizaroo

Latest Threads

Top