내가 사용과 고객 만족 모듈을 구현하고 달콤한 경고 2.고객/그녀는 다시
거의 모든 유일한 출원 활동이 클라이언트가없는 결정시기를 제어하기 위해 노력하고 있습니다 만족도 조사 화면을 다시보십시오.
아이디어는 "다시 묻지 마십시오."라는 메시지가있는 체크 박스를 사용하는 것입니다. 확인 버튼 또는 동일한 체크 박스와 해제 버튼을 클릭합니다. 당신으로
swal({
title: 'Survey',
html: 'Would you like to answer a customer survey?',
type: 'question',
showCancelButton: true,
cancelButtonText: 'No',
confirmButtonText: 'Yes',
confirmButtonClass: 'btn btn-success',
cancelButtonClass: 'btn btn-danger',
buttonsStyling: true,
input: 'checkbox',
inputPlaceholder: 'Do not ask me again'
}).then(function(inputValue) {
win = window.open(win, '_blank');
if (win) {
//Browser has allowed it to be opened
win.focus();
swal({
html: 'The company thanks you for your participation',
type: 'success'
});
// if the customer checked to not see the survey requisition again call a function that update the database (1 for ask again and 0 to not)
if (inputValue) {
customerSurvey(customerId, 0);
}
} else {
swal({
title: 'Atention!',
html: 'Please, allow your browser to display popups window.',
type: 'warning'
});
}
}, function (dismiss) {
swal({
//title: 'Information!',
html: 'Thank you for your attention.',
type: 'info'
});
});
: 같은 고객 행동에
, 나는 1
지금까지 개발 된 코드 0은 다음과 같다 메시지를 표시하고 플래그로 데이터베이스 열 테이블을 업데이트합니다 첫 번째 함수가 inputValue를 매개 변수로 가질 때 고객이 확인란을 클릭하고 "예"버튼을 클릭 할 때 원하는대로 작동합니다. 그러나 해고에 대한 두 번째 기능은 어떻게 처리합니까?
두 번째 제안은 원하는대로 작동했지만 그 이유는 알지 못합니다. 텍스트가없는 일반적인 창 경고와 달콤한 경고 창 앞에 "ok"단추가 표시됩니다. Firefox 및 Google 크롬에 대한 테스트를 마쳤습니다. 첫 번째 제안은 효과가 없었습니다. –
두 번째 제안이 도움이되었습니다. 그러나 지금 귀하의 문제가 무엇인지 이해하지 못하고 있습니까? 정상적인 브라우저 경고가 표시됩니까? 도움이된다면 jsFiddle을 추가해 보겠습니다. –
jSfiddle을 추가하여 내 답변을 편집하고 처음 제안을 삭제했습니다. –