If your JavaScript code returns false, domajax will cancel processing the event. Note that this example can be replaced a cleaner way by using data-confirm.