Bir proje yapıyorum ve window.open ile sorun yaşıyorum. Sorun, window.open şemada çalışmıyor. i ajax başarımında bir sayfa açıldı
swal({
title: "Submit Data ?",
text: "Process only if you are sure",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "Yes, Submit!",
cancelButtonText: "No, Cancel!",
closeOnConfirm: false,
closeOnCancel: false
},
function(isConfirm){
if (isConfirm) {
insertData();
swal("SUCCESS", "Data Has Been Submitted", "success");
window.open("http://188.109.156.21/execution.php?str=james");
} else {
swal("CANCELLED", "", "error");
}
});
function insertData(){
$.ajax({
type: 'POST',
url: "../../../html/main/divpages/submit_data.php",
data: sentReq,
dataType: 'JSON',
success: function (response, textStatus, jqXHR) {
if (response.indexOf("GAGAL") == -1) {
window.location.href = "main.php";
} else {
alert("GAGAL INSERT");
}
}
});
}
yüzden Swal içine windows.open sonuç alma sorun yatıyor hiçbir problem.but ile insertData() yürütebileceği, bu konuda bir ihtiyaç(). Pencerede açılan bir pencere açılmıyor.
'yerde swal'. Ayrıca, bu işlevin ne yaptığını bize gösterir misiniz? –
@MatthewHerbst http://t4t5.github.io/sweetalert/ –
@MisterM yardımsever, teşekkürler! –