eZeeNow.com

it's your's

Dynamic jquery dialog popup generation

 First we need to generate the html text and then bind the html text to body and remove the dialog on before closing the dialog box.

var htmlText = "<div id='testDialog'> This is test dialog popup content </div>"
$("body").append(htmlText);
$("#testDialog").dialog({
resizable: false,
height:140,
modal: true,
buttons: {
"Ok": function() { $(this).dialog( "close" );
$("#testDialog").remove(); },
Cancel: function() {$(this).dialog( "close" );}
}
});




Loading