AJAX Modalpopup并打开新窗口

编程入门 行业动态 更新时间:2024-10-10 11:22:39
本文介绍了AJAX Modalpopup并打开新窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个AJAXMOdalpopup,在弹出面板上我正在显示一些数据,并带有确定"和取消"按钮.当用户单击确定"按钮时,应打开新窗口.为此,我写了下面的代码.

Hi, I have a AJAXMOdalpopup, on the popup panel i am showing some data and with "OK" and "CANCEL" button. when user clicks on the "OK" button it should open new window. for this i have written below code.

<br /> <pre><br /> protected void btnMQReport_Click(object sender, EventArgs e)<br /> { <br /> <br /> string popupScript = "<script language=''javascript''>" +<br /> "window.open(''google'', ''Google'', " +<br /> "''width=1000, height=1000, menubar=yes, resizable=yes'')" + "</script>";<br /> Page.ClientScript.RegisterStartupScript(this.GetType(),"Google", popupScript);<br /> }</pre><br /> <br />

当我单击确定"按钮时,modalpopup disapperas没有任何反应.

when i click on the ''OK'' button modalpopup disapperas and nothing happening.

推荐答案

我首先想到的是modal popup不会引起回发,而该回发会插入指定的脚本在响应流中,然后执行. 创建一个JavaScript函数,并在单击确定"按钮时执行它,而不是尝试使用RegisterStartupScript注入代码. My first thought would be the modal popup is not causing a postback which would insert the specified script in the response stream and thus have it execute. Create a JavaScript function and have it execute when the OK button is clicked rather trying to inject the code with RegisterStartupScript.

更多推荐

AJAX Modalpopup并打开新窗口

本文发布于:2023-11-24 23:36:44,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1627369.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:新窗口   AJAX   Modalpopup

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!