title: jQuery UI modal dialog form show success dialog after post action
body: <p>i'm trying to use jQuery UI Dialog Modal Form with Modal Message after the $.post action as a dialog for Successful submitting message.</p>
  
  <p>so here is the code:</p>
  
  <pre><code>    if ( bValid ) {
           $.post("contact.php", $("#contact").serialize());
           $( this ).dialog( "close" );
       $( "#dialog-message" ).dialog({
           modal: true,
           buttons: {
           Ok: function() {
           $( this ).dialog( "close" );
           }
          }
         });
        }
      },
  </code></pre>
  
  <p>everything works fine except the dialog-message div is readable on the page and disappears only when $( "#dialog-message" ) called in modal window</p>