I have some problems with the function to refresh the main page when a pop is closed.
In my popUp page I have the following javascript
$(function () {
window.onunload = function () {
if (window.opener && !window.opener.closed) {
window.opener.popUpClosed();
}
};
});
In the main page I have the following javascript
$(function () {
function popUpClosed() {
window.location.reload();
}
});
I got an error, that the object don't support the method 'popUpClosed'.
I saw this solution on this answer here in StackOverflow, but I don't know how can I fix this error.