You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I press the form button "Add Category" the dialog appears but after a few seconds it submits itself immediately and the dialog disappears without clicking the buttons "yes" or "no", searching the web I found some solutions but doesn't work for me. The code I use for Alertify JS is the following:
$("#btn-submit").on("click",function(){alertify.confirm("This is an alert dialog?",function(e){if(e){alertify.success("Category was saved.")}else{alertify.error("Category not saved.");}});});
I also try event.preventDefault();:
$("#btn-submit").on("click",function(event){event.preventDefault();alertify.confirm("This is an alert dialog?",function(e){if(e){$("#category-form").submit();alertify.success("Category was saved.")returntrue;}else{alertify.error("Category not saved.");returnfalse;}});});
But does not work as well. Any help please... Thank you.
The text was updated successfully, but these errors were encountered:
I'm creating a blog with bootstrap and I have a form to submit categories:
When I press the form button "Add Category" the dialog appears but after a few seconds it submits itself immediately and the dialog disappears without clicking the buttons "yes" or "no", searching the web I found some solutions but doesn't work for me. The code I use for Alertify JS is the following:
I also try
event.preventDefault();
:But does not work as well. Any help please... Thank you.
The text was updated successfully, but these errors were encountered: