아실 스 게시물을 트리거하기 전에 확인/확인 대화 상자가 있습니다.아약스 성공 후 닫는 jquery 확인 대화 상자
성공 후 확인 대화 상자가 계속 표시됩니다.
내가 무엇이 누락 되었습니까?
function AbandonOrder() {
$('<div></div>').appendTo('body')
.html('<div><strong>Abandon order? <br/> You will be unable to edit this order in the future.</strong></div>')
.dialog({
modal: true, title: 'Abandon order', zIndex: 10000, autoOpen: true,
width: 400, resizable: false,
buttons: {
Yes: function() {
jQuery.ajax({
url: 'some_URL',
type: "POST",
dataType: "JSON",
success: function (data) {
if (data == 'OKAY') {
tosomething();
$('#dlgCard').dialog("close");
}
else {
$("#divMsg").html("<ul><li>This order cannot be edited.</li></ul>")
$('#dlgMsg').dialog('open');
}
//$(this).dialog("close");
$(this).remove();
}
});
},
No: function() { $(this).dialog("close"); }
},
close: function (event, ui) { $(this).remove(); }
});
$('.ui-button-text').css({ fontSize: 12 });
$('.ui-dialog-title').css({ fontSize: 12 });
}
나는
$(this).dialog("close");
및
$(this).remove();
와 tryed하지만 확인은 여전히 계속 표시됩니다.
$('#dlgCard').dialog("close");
당신이 숨겨진에 CSS의 가시성을 변경 시도가 대화 카드를 닫으려고했다? –@MrCoder jquery를 통해 대화 상자를 닫으 려합니다. 나는 시도하지 않았다. – dllhell
[이 사이트] (http://tutorialzine.com/2010/12/better-confirm-box-jquery-css3/)가 도움이 될 수 있습니다. 게다가 confimation도 깨끗하게 보입니다! –