Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #33670

Close parent window or close self but not both

Newsgroups comp.lang.javascript
Date 2017-07-26 14:37 -0700
Message-ID <a4aa6f85-d12a-4138-879a-fe463fb8c19a@googlegroups.com> (permalink)
Subject Close parent window or close self but not both
From justaguy <lichunshen84@gmail.com>

Show all headers | View raw


I have a page with some function buttons.  For one of them, upon click, it opens up a new tab, and this newly opened page/tab has a form, upon data entry and saving, I'd like this tab to close and the parent to be reloaded.

Here's the code:
window.opener.location.href = "parentPage.html?number='#FORM.Number#'"; self.close();

However, the parent page didn't reload and the tab page redirected to parentPage.html?number='#FORM.Number#'

What's wrong?

Alternatively, i'm ok with reload the current tab but close the parent.

Thanks.

Back to comp.lang.javascript | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Close parent window or close self but not both justaguy <lichunshen84@gmail.com> - 2017-07-26 14:37 -0700
  Re: Close parent window or close self but not both (Never Mind) justaguy <lichunshen84@gmail.com> - 2017-07-26 17:39 -0700

csiph-web