Reputation: 870
Here's my code:
function reloadParentAndClose() {
window.opener.location.reload();
window.close();
}
And here's the error I get:
32:132 Uncaught TypeError: Cannot read property 'location' of null(…)
Any ideas what might be happening?
Upvotes: 0
Views: 619
Reputation: 1820
It means that window.opener is null, and therefore trying to access the location property is invalid, since window.opener is null and therefore there is no such thing as window.opener.location
Upvotes: 1