I'm using bootbox to confirm a user action.
I have a button that submits a form, and when that button is clicked I need the user's confirmation to submit or cancel:
$(document).ready(function() {
$(btn_continue).click(function(){
bootbox.confirm('Are you sure?', function(result){
if (result) {
form.submit();
}
else {
return false;
}
});
});
});
the problem is popup appears then disappear without waiting for the user click! Please why this happens?