子窗口打开时禁用父窗口? Plz给我举例。 [英] disable parent window when child window is being open ? Plz give me Example .
本文介绍了子窗口打开时禁用父窗口? Plz给我举例。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用打开的弹出窗口代码:
Use open popup window code:
<script>
var popupWindow = null;
function child_open()
{
popupWindow =window.open('Indent_popup.aspx',"_blank","directories=no, status=no, menubar=no, scrollbars=yes, resizable=no,width=800, height=280,top=200,left=200");
}
function parent_disable() {
if (popupWindow && !popupWindow.closed)
popupWindow.focus();
}
</script>
<asp:Button ID="Add_btn" runat="server" BorderStyle="Solid" Height="22px"
Text="Add" Width="75px" onclick="Add_btn_Click" BorderColor="Gray"
BorderWidth="1px" Font-Bold="True" style="margin-top: 0px"
onclientclick="javascript:return child_open()" CausesValidation="False" />
--- ---------
代码背后:
------------
code behind:
protected void Add_btn_Click(object sender, EventArgs e)
{
this.Add_btn.Attributes.Add("onclick", "javascript:return child_open()");
process();
//this.Add_btn.Attributes.Add("onclick", "javascript:return b_enable()");
//Indent_no_dd.Enabled = false;
}
在此先感谢
Bhushan
Thanks In Advance
Bhushan
推荐答案
你可以使用window.showModalDialog而不是window.open。
You can use window.showModalDialog instead of window.open for this.
这篇关于子窗口打开时禁用父窗口? Plz给我举例。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文