JQuery Dialogbox
<p>I want to add a confirmation button on Dialog box to submit the form. However, when I am clicking on the confirm button , the form is not submitted and just the dialog box is closed. please let me know how can i handle this problem and submit the form by clicking on the confirm button on he dialog box.
to explain more, i can say that there is just s form when i am using document.user.submit() is not submiting the form.(I reckon becuase i already write $("#user").submit(function(){});) </p>

<pre><code>$(function() { 
    $("#user").submit(function() {
    if (change == 1) {
        j_alert("Changes to your financial details may affect your GST or tax status for items already for sale via Momento Shop. Please read and confirm the Momento Shop &lt;a target='_blank' href='/pages/terms_print'&gt;terms and conditions.&lt;/a&gt;");
        return false;
    }

    return true;
    });

    var change = 0;
    $('#abn_gst').change(function() {
        change = 1;
    });

    var j_alert = function (msg) {
    $('.dialog-msg').dialog('option', 'title', 'Financial Settings Warning');
    $('.dialog-msg').html("&lt;br /&gt;&lt;br /&gt;&lt;img src='/affiliate/images/ajax-loader.gif'&gt;");
    $('.dialog-msg').html("&lt;br /&gt;"+ msg);
    $('.dialog-msg').dialog('open');
    $('.dialog-msg').dialog(
            'option',
            'buttons', {
                "Cancel" : function() {
                        $(this).dialog("close");
                },
                "Confirm" : function() {   
                        document.getElementsByTagName("form")[0].submit();
                }
            }
        );
    };
    }
);
</code></pre>

<p>The HTML form:</p>

<pre><code>&lt;form id="user" name="user" class="form" enctype="multipart/form-data" method="post"&gt;
...
&lt;/form&gt;
</code></pre>
