jQueryUI 1.13.0 Breaks dialog function in ASP.NET that works with jQueryUI 1.12.1

671 Views Asked by At

This uses jQuery 3.6.0. Wanting to upgrade from jQueryUI 1.12.1 to 1.13.0. This works as expected with jQueryUI 1.12.1. The LinkButton brings up a modal with information, no user input or interaction other than closing the modal. Changing the library link to 1.13.0 breaks this modal- clicking the LinkButton flashes the page as if it reloaded/postbacked, modal is nowhere to be seen.

ASP.NET aspx page that uses a LinkButton

<asp:LinkButton ID="lbRequest" runat="server" OnClientClick='javascript:return DisplayRequestDialog()' Text="Request"></asp:LinkButton>

which triggers the function:

function DisplayRequestDialog() {
    $("#dialogRequest").dialog({
        autoOpen: true,
        modal: true,
        width: 1100,
        height: 900,
        closeOnEscape: true,
        draggable: false,
        resizable: false,
        title: "Request",
        overlay: "background-color: black; opacity: 90",
        appendTo: "form",
        buttons: {
            Ok: function () {
                $(this).dialog("close");
            }
        }
    });
    return false;
}

I'm not sure if a postback is unexpectedly occurring after clicking the LinkButton, that's a guess so grain of salt there. Open to all ideas on how to investigate what's happening. I haven't seen anything mentioned in jQueryUI 1.13.0 bug notes.

Update (resolved): Thank you all for your help. Fortunately and frustratingly, the issue was due to using the Google CDN link for JQueryUI 1.13.0 (ajax.googleapis.com/ajax/libs/jqueryui/1.13.0/jquery-ui.min.js) which doesn't exist for whatever reason. Issue resolved by changing to a working CDN. Delete my question if that's appropriate. Thanks.

0

There are 0 best solutions below