When clicks on click close button it should stop redirecting using alertify?

Clash Royale CLAN TAG#URR8PPPWhen clicks on click close button it should stop redirecting using alertify?
It is redirecting to profile page when I click the close button. But it goes onclose event section and it should not refresh the page as It returns false but redirecting to profile page.
onclose
returns false
alertify.alert().setting({
'title': 'Message',
'label': 'Redirect to Profile',
'message': 'You have not yet enabled Appointment on your profile?',
'onok': function () {
document.location.href = "/profile";
},
'onclose':function(e){
return false;//It should stop redirecting on profile page
}
}).show();
Thanks.
1 Answer
1
Use
onclose':function(e){
e.preventDefault(); //It will stop redirecting on profile page
return false;//
}
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.