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

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


When 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.

Popular posts from this blog

Arduino Mega cannot recieve any sketches, stk500_recv() programmer is not responding

Visual Studio Code: How to configure includePath for better IntelliSense results

C++ virtual function: Base class function is called instead of derived