title: Call Jquery dialog and pass a string for message
body: <p>I want to call JavaScript function and pass a string to it. I tried this way:</p>
  
  <pre><code>function dialog(a){              
      // Dialog           
      $(a).dialog({        
          width: 600,
          buttons: {
              "Ok": function() { 
                  $(this).dialog("close"); 
              }, 
              "Cancel": function(event) { 
                  $(this).dialog("close");
                  event.preventDefault();
              } 
          }
      });
  </code></pre>
  
  <p>This is the JSF button:</p>
  
  <pre><code>&lt;h:commandButton value="Delete" action="#{SessionsController.deleteSelectedIDs}" 
                      onclick="dialog('Dialog Test')"&gt;
      &lt;f:ajax render="@form" execute="@form"&gt;&lt;/f:ajax&gt;
  &lt;/h:commandButton&gt;
  </code></pre>
  
  <p>When I try to pass a string using this way <code>onclick="dialog('Dialog Test')"</code> it's not working. How I can fix this?</p>
  
  <p>Best wishes</p>