开发者

Refresh a main window from a popup window

开发者 https://www.devze.com 2023-02-14 06:36 出处:网络
Here is my problem. In my web application which has developed using JSP/servelt there is a page with an link. When some one click that link a popup window by calling a javascript function as follows.

Here is my problem. In my web application which has developed using JSP/servelt there is a page with an link. When some one click that link a popup window by calling a javascript function as follows.

function addlist() {

winArray[7] = window.open("Changelist.jsp","changeList","status=1,resizable=0,width=290,height=370");

}

That popup window allow user to add things to the main window. What I 开发者_开发知识库want to do is when user add a new thing main window should get updated. There is already a update ajax function in the main window. What I need to do is when user add new thing to list I need to call the update method in the main window. how can I do this. Thanks in advance.


In your popup window, your JavaScript code may have a reference to the main window thanks to the window.opener property. You could thus call window.opener.update() when the new thing has been added.

0

精彩评论

暂无评论...
验证码 换一张
取 消