Skip to content

Instantly share code, notes, and snippets.

@mrichman
Created September 18, 2009 20:18
Show Gist options
  • Select an option

  • Save mrichman/189271 to your computer and use it in GitHub Desktop.

Select an option

Save mrichman/189271 to your computer and use it in GitHub Desktop.
Is window.parent valid for IE and FF, but not Safari?
<script type="text/javascript">
if (!opener) {opener = window.parent;}
function ClosePopup() {
if (opener) {try{opener.DisableWindowAlwaysOnTop();}catch(e){}}
try{opener.document.getElementById(window.name + 'btnTargetButton').click();}catch(e){}
}
function OnFormSubmit() {
window.onunload = null;
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment