相关疑难解决方法(0)

jQuery模态窗体对话框回发问题

我已经创建了一个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代码: …

asp.net postback jquery-ui

27
推荐指数
3
解决办法
6万
查看次数

.$( "#对话")父()appendTo($( "形式:一是"));

我正在我的页面上打开几个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 />
    &nbsp;
    <div style="overflow: …
Run Code Online (Sandbox Code Playgroud)

asp.net jquery jquery-ui-dialog

6
推荐指数
1
解决办法
1万
查看次数

jQuery UI对话框(模态),防止任何回发

如何在jQuery UI对话框中回发ASP.NET提交按钮?

实际上我正在使用UI对话框模式,就像我们使用Ajax控件工具包的模式一样,来更新存储在gridview控件中的数据值.我能够做所有事情,但我无法使用UI模式触发回发.我对jQuery及其UI有点新,所以找不到一个好的解决方案.

对于Ajax工具包的模态,我们习惯设置一个触发器属性,以便在有人点击其提交按钮时启用回发,但这里就不可能了.以下是我的代码:

//------------Modal first----------------
<div id="editEventModal" title="Edit Event Details" style="display:none">
//-------Here are my controls with asp.net validators
 <asp:Button ID="btnEditEvent" runat="server" Text="Save" ValidationGroup="EditEvent"  />
</div>

//--------- JavaScript/jQuery method for calling popup
function invokeEditPopup(){
    $("#editEventModal").dialog({
        width: 700,
        modal: true
    });
}
//-- Please not that I have not used UI_Dialog's predefined `OK`, `Cancel` buttons as I need to validate my form with asp.net validators on submit button's `click` event.
Run Code Online (Sandbox Code Playgroud)

在gridview中,我在事件中添加了javascript事件invokeEditPopup()到按钮(用于弹出对话框)GridView_DataBound.

如何使btnEditEvent对话框进行回发,以便在服务器上执行所需的过程.

-----------------------有关更多信息------------------我尝试使用jQuery中的想法 …

asp.net jquery jquery-ui

6
推荐指数
1
解决办法
1万
查看次数

ASP.net按钮点击不使用Jquery模态对话框触发

我有一个显示为模态对话框的div.

<div id="div2" style="display: none;" title="Upload Prenda">
        <center>
            <br />
            Select File to Upload:
            <asp:FileUpload ID="PrendaFileUpload" runat="server" Width="345px" />
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="PrendaFileUpload"
                ErrorMessage="File to be uploaded Required" ValidationGroup="X">*</asp:RequiredFieldValidator><br />
            <asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True"
                ShowSummary="False" ValidationGroup="X" />
            <br />
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
            <asp:Button ID="uploadButton" runat="server" Text="Upload" OnClick="uploadButton_Click"
                 Width="100px" />
        </center>
    </div>
Run Code Online (Sandbox Code Playgroud)

这是它的jquery

 <script type="text/javascript">
$(function() {
$( "#div2" ).dialog({
autoOpen: false,
modal:true,
resizable: false,
 height: 200,
width: 600
});
$( "#toggle" ).click(function() {
$( "#div2" ).dialog( …
Run Code Online (Sandbox Code Playgroud)

html javascript c# asp.net jquery

5
推荐指数
1
解决办法
2万
查看次数

标签 统计

asp.net ×4

jquery ×3

jquery-ui ×2

c# ×1

html ×1

javascript ×1

jquery-ui-dialog ×1

postback ×1