I have a transaction edit jQuery dialog that pops up just fine when the correct button is clicked but the "Save" and "Cancel" buttons defined inside the dialog do not show up. The HTML for the dialog is:
<div id="trxpop">
<div>
<label for="txtItem1">Item1: </label>
<input id="txtItem1" type="text" /><br />
<label for="item1">Item2: </label>
<input id="txtItem2" type="text" /><br />
</div>
</div>
and the jQuery is here
jQuery.fn.EditTrx = function (item1, item2) {
$("#txtItem1").val(item1);
$("#item1").val(item1);
$("#trxpop").dialog({
title: 'Edit Transaction',
modal: true,
buttons: {
'Save': function () {
/* Do stuff */
$(this).dialog('close');
},
'Cancel': function () {
$(this).dialog('close');
}
},
resizable: false,
draggable: true,
stack: true,
closeOnEscape: true,
zIndex: 1320,
width: 500
});
}
This should work according to all the docs I have read.
I had to add a new set of brackets around the complete button definition and now it works fine. I edited my original code example above to reflect this change. Thank you for all the replies.