Dialog Cancel Out, then Open and Resubmit form

Dialog Cancel Out, then Open and Resubmit form


I utilize a form inside a dialog to insert and update data about
objects. Below is the code i use to open the dialog. If I open the
dialog and submit the form, all data fields entered are read
successfully and submitted without a problem. If i open the dialog,
then cancel or x out of the dialog, then open it a second time and
submit my form, the new inputs i entered aren't being read, instead it
reads whatever the value of the inputs were on the first load. Any
help is appreciated.
$(document).ready(function(){
     $('#editUrlLink').click(function() {
             $("#linkDialog").dialog('open');
         });
});
function openLinkDialog()
{
    $("#linkDialog").dialog({
        bgiframe: true,
        autoOpen: true,
        height: 350,
        width: 475,
        modal: true,
        buttons: {
            'Submit': function() {
                $.post('submit.cfm',$("#editLinkForm").serialize(),function
(data,status){
                    window.location.reload();
                });
                $(this).dialog('close');
            }, //end upload button
            Cancel: function() {
                $(this).dialog('close');
            }
        },//end buttons
        close: function() {
             $(this).dialog('destroy');
        }
    });
}