JQuery .submit() problem


I want to have a confirmation dialog before a form is submitted. I am using JQuery and the dialog from JQuery-UI.

My problem is that the form is never submitted, even when event.type is “submit” (meaning the event is being triggered by the Continue button callback). When “Continue” is clicked the “if” block in the event handler is certainly executed, and because the submit event is triggered from open dialog, the default has not been prevented:

$(document).ready( function() {
   // Due date confirmation dialog
      autoOpen:  false,
      modal:     true,
      resizable: false,
      buttons: {
         Continue: function() {
         'Back to Incident': function() {
    $('#changeDueDate').submit( function(e) {
        if ( $('#dueDateDialog').dialog("isOpen") ) {
            return true;
        else {

Any ideas? Thank you!