开发者

close pop up window and redirect to parent window in struts2

开发者 https://www.devze.com 2023-04-10 05:03 出处:网络
I have pop up window , in which to upload an excel file of adding new users. After clicking the button and successfully added the users into DB, I want to close the pop up window and refresh the paren

I have pop up window , in which to upload an excel file of adding new users. After clicking the button and successfully added the users into DB, I want to close the pop up window and refresh the parent window to see the updates. In Parent Window, it shows the list of users.

How can I handle all of these events and steps in Struts2 and javascript?

function callAddUsers() {
            document.frmUpload.action = "addUsers.action";
            document.frmUpload.submit();
            } 

I want to display some messages of how many users added in paren开发者_JAVA技巧t window too. How can I pass all those info by action?

Now the problem is when I successfully uploaded and added users, the popup window displays the list of users and I have two window opened.

Thanks.


Simple solution.

just window.close(); the popup window and target="main" , in here just target name of the parent window. all works perfectly :)

0

精彩评论

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

关注公众号