I want to show a custom popup alert with dialog of jquery.

I have call function on form submit

```
<form name="form" method='post' action="user/purchase_user_tip" onSubmit="validateLogin();">

```

jquery code

```
<script type="text/javascript">
     function validateLogin()
     {
         var session = 1;
         if(session==1)
         {
             $('#dialog').dialog('open');
             return false;
         }
     }
 </script>

```

html dialog

```
<div id="dialog" title="Dialog Title" style="display:none"> Some text</div>  

```