Я использую версию 1 SweetAlert:
https://github.com/errakeshpd/sweetalert-1
И мой пример кода ajax выглядит следующим образом, где я сохраняю пользовательские данные.
$.ajax({
type: "POST",
url: "test.php",
data: {name1:name,status1:status},
cache: false,
success: function(result){
$('#submit').prop('disabled', true);
swal({
title: "Report Saved",
type: "success",
text: "The user details saved successfully!",
confirmButtonColor: "#00B4B4"
});
},//success
error: function(result)
{
swal({
title: "Save failed",
type: "warning",
text: "We are unable to save data due to technical reasons!",
confirmButtonColor: "#00B4B4"
});
}
});
если данные status1 == "Followup" , мне нужно перенаправить пользователя:
- после отображения сообщения об успехе и
- после того, как пользователь нажал кнопку ОК.
Как это возможно ??Я новичок и пытаюсь учиться.
Заранее благодарен ..