Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

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

You are here: irt.org | FAQ | JavaScript | Window | Q1761 [ previous next ]

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!

©2018 Martin Webb