jQuery UI Dialog with ASP.NET button postback

前端 未结 17 2049
鱼传尺愫
鱼传尺愫 2020-11-22 14:43

I have a jQuery UI Dialog working great on my ASP.NET page:

jQuery(function() {
    jQuery(\"#dialog\").dialog({
        draggable: true,
        resizable:          


        
17条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-22 15:14

    Fantastic! This solved my problem with ASP:Button event not firing inside jQuery modal. Please note, using the jQuery UI modal with the following allows the button event to fire:

    // Dialog Link
    $('#dialog_link').click(function () {
        $('#dialog').dialog('open');
        $('#dialog').parent().appendTo($("form:first"))
        return false;
    });
    

    The following line is the key to get this working!

    $('#dialog').parent().appendTo($("form:first"))
    

提交回复
热议问题