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

Close window and go to new page

Status
Not open for further replies.

kbestle

Technical User
Mar 9, 2003
67
US
I have a popup window that I have a hyperlink that takes them to another page in a frameset. I want the pop up window to close when they click on the link. I have been able to do one or the other. Can someone please tell me how I can do both from clicking on one hyperlink?

Thanks
 
[maroon]Try this code in the popup window:[/color]
<script language='javscript'>
window.name = 'NameHere'
</script>

[maroon]Here is the link:[/color]
<a href='#' onClick=&quot;window.opener.location='page3.htm';window.close();&quot;>go back</a>

Notes:
The [maroon]NameHere[/color] is the name used in the main window to reference the new window.

[maroon]page3.htm[/color] is the url to change to.





DeZiner
Never be afraid to try something new.
Remember that amateurs built the Ark.
Professionals built the Titanic
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top