I am using SimpleModal in jQuery and I have one confirmation dialog. If the result Yes
, I have to call my.php
into this dialog box. However, I made the code, and I'm still looking for ideas. How can i do this?
$(document).ready(function () {
$('#confirmDialog input.confirm, #confirmDialog a.confirm').click(function (e) {
e.preventDefault();
confirm("Continue", function () {
alert("OK");
});
});
});
function confirm(message, callback) {
$('#confirm').modal({
close:false,
position: ["20%",],
overlayId:'confirmModalOverlay',
containerId:'confirmModalContainer',
onShow: function (dialog) {
dialog.data.find('.message').append(message);
dialog.data.find('.yes').click(function () {
$.get('my.php', function(data){
});
$.modal.close();
});
}
});
}
Here I have a problem with how to write the same Confirmdialog window from an Ajax result. How can i do this?
source
share