Page 1 of 1
Reload main page after info entered into newly opened window
Posted: Mon Aug 16, 2004 7:56 pm
by voltrader
I have a main page which displays some information.
User can enter more information by clicking on link, which opens a new window. When user is finished entering data, the window is closed.
How do I reload the main page to reflect the updated information upon close of the newly opened window?
I've found javascript that reloads current page, but I haven't found anything that reloads a page in another window.
Posted: Mon Aug 16, 2004 8:00 pm
by feyd
onunload, or during the submit, you could set a timer to do it.
Posted: Wed Aug 25, 2004 4:03 am
by RadixDev
According to my source this only works in Netscape...
But here you go anyway:
Main Window:
Code: Select all
<script>
function winopen() {
window.open("whateva.html"."SWindow","");
}
</script>
From the opened page:
Code: Select all
<script>
function RefereshPage(){
opener.location.href='the url of the main page';
}
</script>
Since it only works in NN it's not much good, how about using frames?
Posted: Wed Aug 25, 2004 9:35 am
by Bill H
Put this in the window that is closing. It will refresh the original window.
Code: Select all
<script>onload=function(){opener.location.reload(true);self.close()}</script>
Posted: Thu Aug 26, 2004 3:03 am
by RadixDev
But as I said that only works with Gecko engines.
Posted: Thu Aug 26, 2004 3:54 am
by RadixDev
[WRONG POST] SORRY!
Posted: Thu Aug 26, 2004 8:00 am
by Bill H
The code that I posted is a technique I use on more than one website.
I have tested it and found it to work in IE 5+, Firefox, Netscape, and Opera.
Posted: Thu Aug 26, 2004 10:45 am
by RadixDev
OK... I had it wrong :oops
P.S.2 posts before, i posted inthe wrong topic sorry