I’m using below code to open dialog from another another dialog.
var newDiv = $(document.createElement('div'));
var cnt = '<p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span></p>' + MyMessage;
cnt += '<br/><BR/><input type=button value=Close onClick=$(this).dialog("close") /> '; //add two buttons
newDiv.html(cnt);
newDiv.dialog({ title: "Warning", dialogClass: "error", modal: true })
Close button behavior is not working. I’ve tried $(newDiv) instead of $(this) but it didn’t work. Do you’ve any solution?
I think it’s something like
newDiv.dialog("close");This should work.You need to specify an event for this though. For example,