开发者

JQuery UI Dialog Modal - Re-showing dialog can't edit text

开发者 https://www.devze.com 2023-03-08 21:18 出处:网络
I have a div: <div id=\"mproEmailAccountPopUp\"></div> I declare a Dialog var popupdiv = $( \'#mproEmailAccountPopUp\' );

I have a div:

<div id="mproEmailAccountPopUp"></div>

I declare a Dialog

var popupdiv = $( '#mproEmailAccountPopUp' );
popupdiv.dialog({
    width: 650,
    autoOpen: false,
    modal: false
});

I then get some html form stuff (this works fine) from a server and update the dialog content:

function ShowEdit(accountId) {

    $.ajax({
        type: "POST",
        async: false,
        url: "<%=EmailHandler %>?action=GetEmailAccountEdit",
        data: { accountId: accountId },
        success: function (result) {
            alert("Success GetEmailAccountEdit");

            popupdiv.html(result);
            popupdiv.dialog("open");
            //popupdiv.dialog( "moveToTop" )

        }
    });
}

This works beautifully the first time, but if you press the close button, and then recall the function. The dialog is updated with the new html, but you can't type in ANY of the text boxes. I have narrowed it down to the modal overlay (as it works with modal:false). The z-index seems to be 1 less than the modal form, and I have even deleted (via firebug) the modal overlay div, but I can still not edit the text boxes.

If I turn modal:false then it works fine, modal:true is causing these problems.

As you can see, i have tried the "moveToTop" method, no effect.

I have also tried destroying the popup, and reinitialising it e开发者_开发技巧ntirely from within the ShowEdit function.

Anyone have any clue about what I can do to fix this?

0

精彩评论

暂无评论...
验证码 换一张
取 消