Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ONCE and FOR ALL Reload Parent from Pop Up 1

Status
Not open for further replies.

RPGguy

Programmer
Jul 27, 2001
73
US
I've read all the previous threads and hope someone has the definitive answer. I have a window that has 2 vertical frames. If the user clicks the plus(+) sign in the right frame I execute a script that adds a row to a table and displays an 'Updated' message. When the user clicks the 'Return' button from the pop up, I want to go back to the first window and refresh the data to show that the item clicked in the right frame has been added to the table displayed in the left frame. Here is the code to go from the first script to do the update:

<td width=&quot;5&quot; height=&quot;17&quot; bgcolor=&quot;#CCE7FD&quot;>
<input type=&quot;button&quot; value=&quot; + &quot; href=&quot;doEquipPart1.html?part=<? echo $line[Part]; ?>&quot;
onclick=&quot;window.open(this.href, 'sub', 'width=350,height=120,scrollbars=no,resizable=no');&quot; style=&quot;font-size: 8pt&quot;></table>

Here is the return button code in the popped up window:
<td width=&quot;509&quot; height=&quot;7&quot; valign=&quot;baseline&quot; align=&quot;left&quot; bordercolor=&quot;#FFFFFF&quot; bgcolor=&quot;#FFFFFF&quot; rowspan=&quot;2&quot;>
<p align=&quot;center&quot;>The part has been added to the list!</p>
<p align=&quot;center&quot;>
<input type=&quot;button&quot; value=&quot;Return&quot; onClick=&quot;window.close()&quot;>
</td>



After the second script does the update I want the first screen to reflect on the update done in the second.

In RPG this would take me 2 minutes. I have to believe there is an intelligent way to do it in OO programming. I'm using HTML, PHP and JavaScript.

Thanks,
Scott
 
in the popup, change
<input type=&quot;button&quot; value=&quot;Return&quot; onClick=&quot;window.close()&quot;>

to
<input type=&quot;button&quot; value=&quot;Return&quot; onClick=&quot;opener.parent.top.leftFrameName.location.reload(); window.close()&quot;>

=========================================================
-jeff
try { succeed(); } catch(E) { tryAgain(); }
 
I made the change and now not only doesn't the left frame reload but clicking the return button doesn't work. I will reaearch the 'opener' info thought.

Thanks much,
Scott
 
After some digging I used Jeffs' suggestion this way and it worked like a charm:

<BODY onunload=&quot;opener.parent.top.contents_left.location.reload();&quot;>

Thanks Jeff,
Scott
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top