$(document).ready(function () { $("#form-dialog").dialog({ autoOpen: true, modal: true, width: 200, draggable: true, resizable: true, buttons: { "Close": function () { $("#idDialog").dialog("close"); } } }); });
This will force you to close the button. you can also call the close function
$("#idDialog").dialog("close");
in some function for this. or even using the / a button
< a href="javascript:void(0);" id="btnDone" onClick="$("#idDialog").dialog("close");">CLOSE</a>
EDIT: you need this to include your dialog in the form:
open: function (type, data) { $(this).parent().appendTo($("form:first")); }
Michel Ayres Apr 01 2018-11-11T00: 00Z
source share