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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parent Problem 1

Status
Not open for further replies.

fischadler

Programmer
May 31, 2002
258
MT
Hi,
I am using the code below to open a pop up window. The pop up window has a link which, if clicked, should update the page in the parent window that originally called the pop up.

Code:
<script>
<!-- Hide from old browsers
function winopen(PageURL){
  window.open(PageURL, 'NewWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width=750,height=400,left=0,top=0')
}
// -->
</script>

I tried using <a target="_parent"> but the new page loads in the pop up.

Is there some other way to do it?

Thanks


P.S. Excuse the pun in the subject!

-Fischadler
 
If you want to refresh the parent page, you can use something like this:

Code:
<a href="javascript:window.opener.location.reload(true);">

Although be aware that once the opening window has refreshed, you may find that the "opener" handle is no longer valid, so the code may only work once.

Hope this helps,
Dan


[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Ok, sorry, I think I did not use the right words. I need to load another page in the original window, not refresh the page.



-Fischadler
 
With Dan's help I found a solution:

Code:
<a href="javascript:window.opener.location='[URL unfurl="true"]http://www.yahoo.com';[/URL] self.close();">

Thanks Dan! A star goes to you.

-Fischadler
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top