title: Jquery confirm window not working on cancel button click
body: <p>I have the following code in the javscript to open a confirmation dialog with yes and no options ,but i am facing some problem in opening the confirmation dialog.</p>
  
  <pre><code>function ConfirmDialog(obj, title, dialogText) {
      if (!dialogConfirmed) {
          $('body').append(String.Format("&lt;div id='dialog' title='{0}'&gt;&lt;p&gt;{1}&lt;/p&gt;&lt;/div&gt;",
                      title, dialogText));
  
          $('#dialog').dialog
                  ({
                      height: 150,
                      modal: true,
                      resizable: false,
                      draggable: false,
  
                      close: function (event, ui) { $('body').find('#dialog').remove(); },
                      buttons:
                      {
                          'Yes': function () {
                              $(this).dialog('close');
                              dialogConfirmed = true;
                              GetRadWindow().close();
                              if (obj) obj.click();
                          },
                          'No': function () {
                              $(this).dialog('close');
                          }
                      }
                  });
      }
  
      return dialogConfirmed;
  }
  </code></pre>
  
  <p>This is my code on the aspx page</p>
  
  <pre><code> &lt;script type="text/javascript" src="Scripts/jquery-1.4.2.min.js"&gt;&lt;/script&gt;
                  &lt;script type="text/javascript" src="Scripts/jquery-ui-1.8.2.custom.min.js"&gt;&lt;/script&gt;
                   &lt;script type="text/javascript" src="Scripts/jquery-1.4.1.js"&gt;&lt;/script&gt;
  
              &lt;input id="Button2" type="button" value="Cancel" onclick="return ConfirmDialog(this, 'Confirmation', 'Are you sure want to close the window?');" /&gt;
  </code></pre>