I have a jquery ui dialog and inside of it I have another one
and before opening the one on the inside I call $.get
to receive the html for it
if I open the first dialog and close it then open it again and try to open the dialog on the inside the html received from $.get doesn't get set
page1
<script type="text/javascript">
$(function() {
$("#bidialog").dialog({
resizable: true,
height: 500,
width: 700,
modal: true,
autoOpen: false,
buttons: { 'Anuleaza': function() { $(this).dialog('close'); } }
});
});
function openit() {
$.get('<%=Url.Action("Index", "Bank") %>', function(data) { $("#bidialog").html(data); })
$("#bidialog").dialog('open');
}
$(function() { $("#bopen").click(openit); });
</script>
<div id="bidialog" title="the dialog">
first content
</div>
<button id="bopen">
openit</button>
page2
<script type="text/javascript">
$(function() {
$("#bcdialog").dialog({
resizable: true,
height: 400,
width: 600,
modal: true,
autoOpen: false,
buttons: { 'Anuleaza': function() { $(this).dialog('close'); } }
});
});
$(function() {
$("#create").click(createBank);
});
function createBank() {
$.get('<%=Url.Action("Create", "Bank") %>', function(data) { $("#bcdialog").html(data); })
$('#bcdialog').dialog('open');
}
</script>
<div id="bcdialog" style="display:none;" title="create bank">
first content
</div>
<button class="ui-state-default ui-corner-all" id="create">
<span class="ui-icon ui-icon-circle-plus fl"></span>Adauga</button>