如何在打开的窗口中更新UpdatePanel(当然,通过Javascript) [英] How to update UpdatePanel in an opener window (Ofcourse, through Javascript)

查看:47
本文介绍了如何在打开的窗口中更新UpdatePanel(当然,通过Javascript)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



特定的aspx页面通过javascript打开另一个aspx页面.
子窗口的工作完成后,用户在其中按下按钮.

完成后,我需要在子aspx窗口的javascript方法中执行这些操作

Hi,

A particular aspx page opens another aspx page through javascript.
Once the child window''s work is done, the user presses a button in it.

And once that is done I need to perform these actions in the javascript methods of the child aspx window

function fnSave(){
/*LINE 1: Replace this line with code to : Update an update panel in the opener window*/
/*LINE 2:*/ self.close();
}



在子窗口中单击一个按钮时,将调用此fnSave Javascript函数(在子窗口中显示).

您能帮助我的第一部分吗?更新动作只是更新.没有传递任何参数.我对此的所有研究都变得徒劳.



This fnSave Javascript function (present in the child window) will be called on clicking of a button in the child window.

Can you help me the first part? The update action is just update. No parameters passed or anything. All my research on this are turning to be futile.

推荐答案

您可以使用
window.opener.document.forms(0).submit();

提交父页面.

或者,您可以添加带有style ="display:none"的按钮控件,然后将此按钮添加到UpdatePanelAsyncPostBackTrigger中.比在父页面上创建此功能

to submit parent page.

Or you can add a button control with style="display:none" and add this button to UpdatePanel''s AsyncPostBackTrigger. Than create this function on parent page

function raiseAsyncPostback() {
         __doPostBack("<%= this.YourButtonID.UniqueID %>", "");
     }


并使用window.opener.raiseAsyncPostback();在您的孩子中调用此函数.

这将很好地解决您的问题.


and call this function in your child using window.opener.raiseAsyncPostback();.

This will surly solve your problem.


这篇关于如何在打开的窗口中更新UpdatePanel(当然,通过Javascript)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆