Refresh main window in popup

Here is my problem. My web application that is developed using JSP / servelt has a page with a link. When someone clicks the link, you will see a popup window calling the javascript function as follows.

function addlist () {
winArray [7] = window.open ("Changelist.jsp", "Change list", "status = 1, changeable = 0, width = 290, height = 370");

}

This popup allows the user to add things to the main window. What I want to do is when the user adds a new one, the main window should be updated. The main window already has ajax update function. I need to do when the user adds a new thing to the list. I need to call the update method in the main window. How can i do this. Thanks in advance.

+4
source share
1 answer

In your popup, your JavaScript code may have a link to the main window thanks to the window.opener property. That way you can call window.opener.update() when a new thing has been added.

+4
source

Source: https://habr.com/ru/post/1341798/


All Articles