内联弹出窗口引发时如何使后台处于非活动状态
问题描述:
我试图用我的jquery模式对话框阻止背景,直到用户关闭窗口。关于如何实现这个的任何想法?
通过阻止背景我的意思是禁用页面上的其他元素(即使其他元素无法点击)。
我的编码是否有任何错误????
我的尝试:
I am trying to block the background with my jquery modal dialog until the user closes the window. Any idea on how to achieve this?
By "blocking the background" I mean disabling the other elements on the page (i.e. making other elements unclickable).
Is there any errors on my coding????
What I have tried:
<script type="text/javascript">
$( function () {
$("[id*=btnadd]").live("click", function () {
$("#modal_dialog").dialog({
title: "Manage Branch",
autoopen: false,
width: 500,
buttons: {
ADD: function () {
var textvalue = $("#<%=TextBox2.ClientID%>").val();
$('#<%= hndtxt.ClientID %>').val(textvalue);
$("[id*=add]").click();
},
Close: function () {
$(this).dialog('close');
}
}
});
});
} );
</script>
<input type="button" id="btnadd" value="Add Branch" name="btnadd" style="float: right" />
<div id="modal_dialog">
<div class="tab_container">
<div id="tab2" class="tab_content">
<table cellspacing="0">
<tbody>
<tr>
<td>
Branch:
<asp:TextBox ID="TextBox2" runat="server" Style="margin-left: 97px">
<asp:label id="lbl_status" runat="server" cssclass="red" text="">
<br>
<br>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end of #tab1 -->
</div>
<!-- ID -->
</div>
答
( function (){
( [id * = btnadd])。live( 点击, function (){
("[id*=btnadd]").live("click", function () {
( #modal_dialog) .dialog({
title: Manage Branch,
autoopen: false ,
width: 500 ,
buttons:{
ADD: function (){
var textvalue =
("#modal_dialog").dialog({ title: "Manage Branch", autoopen: false, width: 500, buttons: { ADD: function () { var textvalue =