Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #33670 > unrolled thread
| Started by | justaguy <lichunshen84@gmail.com> |
|---|---|
| First post | 2017-07-26 14:37 -0700 |
| Last post | 2017-07-26 17:39 -0700 |
| Articles | 2 — 1 participant |
Back to article view | Back to comp.lang.javascript
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
| From | justaguy <lichunshen84@gmail.com> |
|---|---|
| Date | 2017-07-26 14:37 -0700 |
| Subject | Close parent window or close self but not both |
| Message-ID | <a4aa6f85-d12a-4138-879a-fe463fb8c19a@googlegroups.com> |
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.
[toc] | [next] | [standalone]
| From | justaguy <lichunshen84@gmail.com> |
|---|---|
| Date | 2017-07-26 17:39 -0700 |
| Subject | Re: Close parent window or close self but not both (Never Mind) |
| Message-ID | <4cd5ad31-ed34-4dd7-94db-8647576e8cc5@googlegroups.com> |
| In reply to | #33670 |
On Wednesday, July 26, 2017 at 5:37:57 PM UTC-4, justaguy wrote: > 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. Never mind. I forgot to comment out previous server side code, thus, the js code wasn't even being called.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.javascript
csiph-web