title: Primefaces run java script onComplete/onClick
body: <p>I have a p:command button as shown below.</p>
  
  <pre><code>&lt;p:commandButton id="settings" ajax="false" onComplete="window.alert('sometext');"      value="#{messages.settings}"
  styleClass="cancelButton" style="font-family: sans-serif, Arial, Helvetica, Geneva; font-size: 10pt; width: 90px;" /&gt;&lt;/td&gt;
  </code></pre>
  
  <p>I want this button to run a java-script onComplete or onClick but I can not get any of them to work. I actually want it to open a popup but here I have tried with an easier script to just do an alert. But this does not work either. Nothing happens at all.</p>
  
  <p>Can anyone help me?</p>