Ich mache ein Projekt und ich habe ein Problem mit window.open. Das Problem ist window.open funktioniert nicht in meinem Schema. Ich brauche eine Hilfe zu diesem Thema,Öffnen einer Seite Popup auf Ajax Erfolg
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");
}
}
});
}
, so kann ich ausführen insert() ohne problem.but das Problem liegt, wenn sie innerhalb SwaI windows.open executin(). Ich sehe kein Fenster Popup öffnet sich.
Sie nie 'nennen überall swal'. Könnten Sie uns bitte auch zeigen, was diese Funktion macht? –
@MatthewHerbst http://t4t5.github.io/sweetalert/ –
@MisterM hilfreich, danke! –