Open hoteloptics opened 9 years ago
Use event.preventDefault()
I have the same problem, I tried event.preventDefault();
but doesn't work for me.
Try this
$("#confirm").on( 'click', function (e) { if(e.preventDefault){e.preventDefault();} reset(); alertify.confirm("This is a confirm dialog", function (e) { if (e) { alertify.success("You've clicked OK"); } else { alertify.error("You've clicked Cancel"); } }); });
I'm creating HTML within a PERL wrapper, and I have an href link that is giving me fits.
The code that's being invoked is:
I've also tried the following, which also didn't work:
Browser=Firefox
The behavior that's happening is that the confirmation dialog stays open for about 1 split second, then disappears, and the default action fires off.
Any idea what I'm doing wrong?