I am trying to use UI dialog to create a modal dialog.
The dialog workscorrectly, and all is well. I close the dialog using the \"X\" in the corner.
I tried using
You can clear all input elements dynamically.
$("#New_WorkBoard_Dialog input[type='text']").each(function(index, element) {
$(element).val("");
)};
If you prefer, you can clear it on close event of the dialog:
$('#New_WorkBoard_Dialog').dialog({
autoOpen: false,
height: 530,
width:300,
modal: true,
resizable:false,
buttons: {
Cancel: function() {
$(this).dialog('close');
//$('#New_WorkBoard_Dialog').dialog('destroy');
},
'Register board': function() {
var board_name=document.getElementById("name");
var comments=document.getElementById("comment");
Createboard(board_name,comments);
$(this).dialog('close');
}
},
close: function() {
$("#New_WorkBoard_Dialog input[type='text']").each(function(index, element) {
$(element).val("");
)};
}
});