fabien-d / alertify.js

JavaScript Alert/Notification System
http://fabien-d.github.com/alertify.js/
4.26k stars 726 forks source link

Alertify Confirm Automatically Refresh Page #276

Open DennisLiu88 opened 5 years ago

DennisLiu88 commented 5 years ago

Hi,

Could anyone help me with using

alertify.confirm("This is a confirm dialog.",
  function(){
    alertify.success('Ok');
  },
  function(){
    alertify.error('Cancel');
  });

Because when i use that code when the message box pop up, it automatically refresh the page. I didn't call any refresh page. So when the messagebox pop up i have no time to choose or click ok or cancel because it refresh the page.

Is that a bug ? how i can prevent it from refresh the page ?

Thank You

TeeeeJay commented 5 years ago

Hello use it as a function `' and in your html call the function onclick="return xFunction(event) ;"

DennisLiu88 commented 5 years ago

Thank You