Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q1761 How can I close the current popup window's opener?

irt.org | Knowledge Base | JavaScript | Window | Q1761 [ previous next ]

Q1761 How can I close the current popup window's opener?

You can close a main window without confirmation using the next script code:

<script language="javascript">
function closeWin() {
  window.opener=parent;
  window.close();
  return true;
}
</script>

Then in the button onClick event ...

<form>
<input type="button" onClick="return closeWin()">
</form>

Submitted by Guille!


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.