Disable a button in a jQuery modal dialog while loading
Hi,
I'm new to JQuery.I have a jQuery dialog. In this form, I have a "Save" button. I would like this "Save" button to be disabled while the modal dialog open or from a function.
The code i wrote to create this button is given below. However, I don't know how to enable and disable the dialog button from a function or at the time of loading the dialog. What should I do?
$('#divAddExpense').dialog({
modal: true,
autoOpen: false,
height: 'auto',
width: 650,
draggable: true,
position: 'center',
resizable: false,
buttons: { "Close": function () { $(this).dialog('close'); },
"Save": function (evt) {
//Save click code here
},
close: function () {
//some code
}
});
Plz help me out.