0

I have a modal dialog. I want one button to be disabled and then later enabled. I plan to do this by adding an id to the button and then using that id to use the add/remove attribute disabled. If there is another way I am open to suggestions. Here is some sample code:

$('#navDialog').dialog({
        modal:true,
        autoOpen:false,
        height: 'auto',
        width: 'auto',
        title: "Category Editor",
        buttons: {
            "Delete": function(){somethingMore();},
            "Edit": function(){something();},
            "Confirm":function(){importantSomething();}
        },
        draggable: true,
        resizable: false
    });

I want to be able to control the Confirm button.

3 Answers 3

2
$('#navDialog').dialog({
    modal:true,
    autoOpen:false,
    height: 'auto',
    width: 'auto',
    title: "Category Editor",
    buttons: [{
        id:"btn-delete",
        text:"Delete",
        click:function(){somethingMore();}
    },{
        id: "btn-edit",
        text:"Edit", 
        click: function(){something();}     
   },{
        id:"btn-confirm"
        text:"Confirm", 
        click:function(){importantSomething();}
    }],
    draggable: true,
    resizable: false
});
Sign up to request clarification or add additional context in comments.

Comments

1

You can try this:

$('.ui-dialog-buttonpane button:contains(Ok)').hide();

Comments

0

There currently isn't any proper way of doing this. It's on the roadmap for inclusion but I don't exactly know when. I'll report back when I've found the forum post detailing this issue.

1 Comment

Hmm, couldn't find any. Anyone know how I can delete my own answer :p ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.