Jquery and Dialog Validation
<p>I am having one hell of a time trying to get this to work, no javascript errors what so ever. Its just going right to the action. Here is the javascript I am using</p>

<blockquote>
  <p>$(function(){</p>

<pre><code>      $("form[name=form1]").submit(function(){
          return $("#dialog").dialog({
              autoOpen:false,
              bgiframe: true,
              resizable: false,
              //height:auto,
              width:500,
              modal: true,
              overlay: {
                  backgroundColor: '#000',
                  opacity: 0.5
              },
              buttons: {
                  'I Agree': function() {
                      $(this).dialog('close');
                      return true;
                  },
                  'I Do Not Agree': function() {
                      $(this).dialog('close');
                      return false;
                  }
              }
          });     
    });         
</code></pre>
  
  <p>});</p>
</blockquote>
