I need to show a popup in a button click..I have created dialog box and appended table into it.It displays popup in button click.but when i click cancel in dialog box and again i click button,the table inside it is not displaying.(only dialog is showing).
Below my code:
var DUDialog = $('
');
DUDialog.dialog({
width: $(window).width() * 0.3,
height: $(window).height() * 0.7,
modal: true,
title: "Import Loan",
show: 'clip',
hide: 'clip',
buttons: [
{text: "Submit", click: function() {doSomething()}},
{text: "Cancel", click: function() {$(this).dialog("close")}}
]
});
debugger;
$('', { 'border': '0', 'cellpadding': '2', 'cellspacing': '0', 'align': 'center', 'width': '98%' })
.append($('
', { 'style': 'height:28px;' }).append($('
', { 'colspan': '8' }).append($('
').append($('<label/>', { 'html': 'File Name', 'id': 'lnkFile_' + loanID + '_loan' }).append($('
', { 'colspan': '8' }).append('<input type="file" name="fileUpload1" id="fileUpload1" class="fileUpload" />'))))))
.append($('
', { 'style': 'height:28px;' }).append($('
', { 'colspan': '8' }).append($('
').append($('<label/>', { 'html': 'File Type', 'id': 'lblFileType' }).append($('
', { 'colspan': '8' }).append('<select id = "ddlFileType" style="width: 100%"><option value="0">FannieMae DU</option></select>'))))))
.append($('
', { 'style': 'height:28px;' }).append($('
').append($('
', { 'colspan': '8' }).append($('<button/>', { 'html': 'Import', 'id': 'btnImport' })))))
.appendTo('#ImportDUDialog');