title: how to call custom alert on dialog method of jquery on form submit?
body: <p>I want to show a custom popup alert with dialog of jquery.</p>
  
  <p>I have call function on form submit</p>
  
  <pre><code>&lt;form name="form" method='post' action="user/purchase_user_tip" onSubmit="validateLogin();"&gt;
  </code></pre>
  
  <p>jquery code</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
       function validateLogin()
       {
           var session = 1;
           if(session==1)
           {
               $('#dialog').dialog('open');
               return false;
           }
       }
   &lt;/script&gt;
  </code></pre>
  
  <p>html dialog</p>
  
  <pre><code>&lt;div id="dialog" title="Dialog Title" style="display:none"&gt; Some text&lt;/div&gt;  
  </code></pre>