我已经创建了一个jQuery UI Modal表单,我希望该表单能够触发回发,但是我很难让它运行起来.
我知道有很多基于使用SimpleModal插件的文章,我试图改编这些并覆盖_doPostback函数,但没有任何乐趣.
我认为问题在于我的__doPostBack函数调用以及参数应该是什么.是这样的吗?
这是我的表格
<form id="summaryForm" runat="server">
<div id="dialog" title="Quick Booking">
<p>Select user from list or enter name in box</p>
<fieldset>
<p><label>Is machine going out of the office?</label></p>
<asp:RadioButton TextAlign="Left" GroupName="outOfOffice" Text="Yes" ID="optYes" class="radio" runat="server" />
<asp:RadioButton TextAlign="Left" GroupName="outOfOffice" Text="No" ID="optNo" class="radio" runat="server" Checked="true" />
<label for="dropLstUser">User:</label>
<asp:DropDownList ID="dropLstUser" runat="server" />
<input type="text" name="txtUser" id="txtUser" value="" class="text" />
<label for="txtStartDate">Start Date:</label>
<input type="text" id="txtStartDate" name="txtStartDate" class="datepicker" />
<asp:HiddenField ID="assetField" runat="server" />
<%--<button onclick="performPostBack('summaryForm')">Postback</button>--%>
</fieldset>
</div>
//--------------------------------
Run Code Online (Sandbox Code Playgroud)
这是JavaScript代码: …
我正在我的页面上打开几个jQuery对话框,我正在使用:
$("#dialog2").parent().appendTo($("form:first")); //This was working, no problem.
Run Code Online (Sandbox Code Playgroud)
我注意到,当我再次将它应用于dialog3时,它已经停止了该对话框的工作.如何将它用于不同的对话框?
$("#dialog2").dialog({
bgiframe: false,
autoOpen: false,
height: 410,
width: 800,
modal: true,
draggable: true,
resizable: true
});
$("#dialog2").parent().appendTo($("form:first")); //doesn't work now
$("#dialog3").dialog({
bgiframe: false,
autoOpen: false,
height: 410,
width: 600,
modal: true,
draggable: true,
resizable: true
});
$("#dialog3").parent().appendTo($("form:first"));
Run Code Online (Sandbox Code Playgroud)
HTML:
<div id="dialog3" title="Attachments">
<p id="P1">
<asp:Button ID="btnAttach" runat="server" Text="Attach files" class="float-left ui-button"/></p>
<fieldset>
</fieldset>
</div>
<div id="dialog2" title="Notes">
<asp:Image ID="Image1" runat="server" ImageUrl="~/images/icons/user_comment.png" />
<asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Size="Larger" Text="Notes"></asp:Label>
<br />
<div style="overflow: …Run Code Online (Sandbox Code Playgroud)