1

I need to reload current location(href) via JS : I have a button that open a new window and when that window closed I need to reload the location in window that was initiator(parent). It is work in my browser, but one said me that his window does not reload( he has last version chrome and mac book)

I have the followin code:

var loginWindow = window.open(...);
loginWindow.focus();
loginWindow.onbeforeunload = function() {
  location.reload(); //when the popUp window close
  //I even tried this:
  window.location.href = window.location.href;
}

but the page not reloaded

Haygo
  • 125
  • 2
  • 12
  • tried using loginWindow.onunload instead of loginWindow.onbeforeunload but it seems to get called twice in chrome – Sunand Sep 05 '14 at 22:27

1 Answers1

-1

AS onbeforeunload does not work here it is recommended to check if the window exists with certain interval Please find the reference link below

Check this post

Community
  • 1
  • 1
Sunand
  • 703
  • 4
  • 9