wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes Closing a parent window from a popup Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Closing a parent window from a popup" Watch "Closing a parent window from a popup" New topic

Closing a parent window from a popup

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9351


I would like to close a parent window from a popup. Is there any way to do this? The parent window is a portal window.

SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902

May this Google Search helps !

[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15376
If the parent is opened up by JavaScript, than you can use window.close. If it was not opened up by JavaScript you can not do it since that is a security concern and rather rude.

It is sorta covered in the JavaRanch Style Guide.
subject: Closing a parent window from a popup