Answers for "jquery dialog button text set by variable"

0

jquery dialog button text set by variable

$("#dialog_box").dialog({
    autoOpen: false,
    modal: true,
    resizable: false,
    buttons: [{
        text: "Ok",
        "id": "btnOk",
        click: function () {
            //okCallback();
        },

    }, {
        text: "Cancel",
        click: function () {
            //cancelCallback();
        },
    }],
    close: function () {
        //do something
    }
});

var newLabel = "Updated Label";
$("#btnOk").html('<span class="ui-button-text">'+ newLabel +'</span>')
Posted by: Guest on February-26-2020

Code answers related to "jquery dialog button text set by variable"

Code answers related to "Javascript"

Browse Popular Code Answers by Language