473,320 Members | 2,098 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Parent Window Reload

I'm facing a tricky (at least for me) page reload/refresh scenario and
need some help.

I'm working on a web application which is primarily used with MSIE. The
application has a main window with an i-frame in it. The i-frame
contains various dynamic links for opening data entry popups. One of
these popups has a couple of i-frames itself. These i-frames also have
links to scripts which make changes to a server side database.

I need for the main application window to reload (refresh) when a
script is run in one of the i-frames of the popup data entry window
(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.

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

Thanks,
Raffi

Jan 17 '07 #1
7 24499
ASM
Raffi a écrit :
I need for the main application window to reload (refresh) when a
script is run in one of the i-frames of the popup data entry window

I would prefer not to use specific window/frame names but to use
relative properties like parent, top, frame[1] etc.
The mother of your popup is 'opener'
The mother of your iframe in the popup is 'parent'

so, from iframe in the popup :

parent.opener.location.reload();

from iframe in iframe of popup :
top.opener.location.reload();

Take care that probably the main window after refresh will forget its
daughter (the popup will no more exist for her)
so the popup will have to close itself.
However the popup continues to know its opener window and will yet be
able to sent informations to the new reloaded file.
(i.e. to feed text fields of form in main window)
--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Jan 18 '07 #2

ASM wrote:
Raffi a écrit :
I need for the main application window to reload (refresh) when a
script is run in one of the i-frames of the popup data entry window

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

The mother of your popup is 'opener'
The mother of your iframe in the popup is 'parent'

so, from iframe in the popup :

parent.opener.location.reload();

from iframe in iframe of popup :
top.opener.location.reload();

Take care that probably the main window after refresh will forget its
daughter (the popup will no more exist for her)
so the popup will have to close itself.
However the popup continues to know its opener window and will yet be
able to sent informations to the new reloaded file.
(i.e. to feed text fields of form in main window)
--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Thanks for your suggestions. Unfortunately both of these are only
refreshing the i-frame in the main window, not the main window itself.

Any other suggestions are welcome.

Thanks,
Raffi

Jan 18 '07 #3
ASM
Raffi a écrit :
ASM wrote:
>so, from iframe in the popup :

parent.opener.location.reload();

from iframe in iframe of popup :
top.opener.location.reload();
Thanks for your suggestions. Unfortunately both of these are only
refreshing the i-frame in the main window, not the main window itself.

Any other suggestions are welcome.
put your code on line
that we could understand your application

http://stephane.moriaux.perso.wanado...uc/tutticanti/
works fine for me

reloading a page via 'location.reload()'
won't reset forms of this page

to get an reseted page : location = location;

see the both examples in the iframe of my popup

--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Jan 18 '07 #4
ASM wrote:
Raffi a écrit :
ASM wrote:
so, from iframe in the popup :

parent.opener.location.reload();

from iframe in iframe of popup :
top.opener.location.reload();

Thanks for your suggestions. Unfortunately both of these are only
refreshing the i-frame in the main window, not the main window itself.

Any other suggestions are welcome.

put your code on line
that we could understand your application

http://stephane.moriaux.perso.wanado...uc/tutticanti/
works fine for me

reloading a page via 'location.reload()'
won't reset forms of this page

to get an reseted page : location = location;

see the both examples in the iframe of my popup

--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Thanks for the reply and the example. This example works for me too.
However, in the application, the main page (Mother) is also in an
i-frame. In your example the main page does not have an i-frame. When I
put an i-frame in the main page of your example, the reload link only
refreshes the i-frame, not the main window.

Raffi

Jan 19 '07 #5
ASM
Raffi a écrit :
>
Thanks for the reply and the example. This example works for me too.
However, in the application, the main page (Mother) is also in an
i-frame. In your example the main page does not have an i-frame. When I
put an i-frame in the main page of your example, the reload link only
refreshes the i-frame, not the main window.
I think you're wrong.
Nothing in code of 'tutticanti' can reload only Mother's iframe.

You have :
- a first link to reload the mother's file (no forms reset)
- a second link to re-open/re-download mother's file
(forms, iframe, etc, reseted)

With iframe in mother's file it is OK too
http://stephane.moriaux.perso.wanado...uc/tutticanti/

--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Jan 19 '07 #6

ASM wrote:
Raffi a écrit :

Thanks for the reply and the example. This example works for me too.
However, in the application, the main page (Mother) is also in an
i-frame. In your example the main page does not have an i-frame. When I
put an i-frame in the main page of your example, the reload link only
refreshes the i-frame, not the main window.

I think you're wrong.
Nothing in code of 'tutticanti' can reload only Mother's iframe.

You have :
- a first link to reload the mother's file (no forms reset)
- a second link to re-open/re-download mother's file
(forms, iframe, etc, reseted)

With iframe in mother's file it is OK too
http://stephane.moriaux.perso.wanado...uc/tutticanti/

--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Try putting the link (and javascript function) to open the popup inside
the i-frame of the parent window. This will result in the i-frame being
refreshed but not the main window itself.

Raffi

Jan 19 '07 #7
ASM
Raffi a écrit :
ASM wrote:
>>
With iframe in mother's file it is OK too
http://stephane.moriaux.perso.wanado...uc/tutticanti/

Try putting the link (and javascript function) to open the popup inside
the i-frame of the parent window. This will result in the i-frame being
refreshed but not the main window itself.
Give an url of your work to see what you mean.

Of course if you use directly JS from main page in one of its daughters
(iframe or popup) that will not work without adaptations ... :-(

With last example, I think you have all what is necessary.
You only have to play with truc, opener, parent, iframes names, document
and forms, combining them to do the expected job.
Read and understand how JS calls are built in 'frame.htm' and 'essai.htm'

Put JS functions in main page.
To call function motherFunction(arguments)
- From 'father' : parent.motherFunction(arguments);
- From popup : opener.motherFunction(arguments);
- From iframe in popup : parent.opener.motherFunction(arguments);
--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Jan 19 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Winfried Koenig | last post by:
Hi everyone, I have a main page: -------------------------------------------------- <html><head><title>Test</title> </head><body> <img id="img_a" name="img_a" src="image_1.png" alt=""><br>
1
by: Debbie Davis | last post by:
Hi there, I'm not very good at javascript but I'm using the following to close a child window and refresh a parent window after updating a database. It's within an ASP page. CODE <SCRIPT>...
10
by: Marshall Dudley | last post by:
When I do the following line in Netscape, the popup loads as it should, but the parent window usually, but not always, reloads as well. <a href="#"...
2
by: Snolly | last post by:
Hi all, Here is my issue. I have a web page (lets call it page1) with an iframe in it that then opens a pop-up window (page2). The pop-up window is used to edit some data that was loaded into...
2
by: Raj | last post by:
Hi All, I have a problem with trying to refresh the parent window from child window in order to update data in the parent window. The sequence of events are 1) I click a button in the parent...
4
by: Earl Teigrob | last post by:
I am thinking about using a popup window to edit settings that will affect parent asp.net page. The data that is changed in the popup window will be saved to the datastore that is loaded and...
3
by: Joe | last post by:
I need to popup a window, allow the user to select an image, update the parent window with this new value (requires a refresh) and then close the child window. Are there any examples of...
2
by: svbc | last post by:
Hi, I am facing a problem with refreshing parent: Parent window : A From A I am opening a child window B using...
4
by: Buddha | last post by:
Hello, I posted this on two forums, without too much help .. and I am kinda stuck in this. I need to refresh the parent page from the second child window which is opened by the first child and...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.