title: Checkbox's onchange method not working with jsf and javascript
body: <p>My codes are bellow,</p>
  
  <p>JSF :   </p>
  
  <pre><code>&lt;h:selectBooleanCheckbox id="bundleAdded" value="#{accountAdjustmentBean.bundleAdded}"
         required="true" onchange="if(this.checked != bundleAdded)  {
               alert('Click works')} 
               else { alert('Not worked!') }"/&gt;
  &lt;h:message styleClass="errors" for="bundleAdded"/&gt;
  </code></pre>
  
  <p>My backing bean :</p>
  
  <pre><code>public class AccountAdjustmentsBean extends BaseBean {
     private boolean bundleAdded;
     // public setters, getters and other stuffs
  }
  </code></pre>
  
  <p>face-config.xml :</p>
  
  <pre><code>&lt;managed-bean&gt;
      &lt;description&gt;
          Backing bean used do account adjustments
      &lt;/description&gt;
      &lt;managed-bean-name&gt;accountAdjustmentBean&lt;/managed-bean-name&gt;
      &lt;managed-bean-class&gt;beyondm.bi.customercare.view.bean.AccountAdjustmentsBean&lt;/managed-bean-class&gt;
      &lt;!-- NOTE!: proper behaviour of this bean relies on being created for each request --&gt;
      &lt;managed-bean-scope&gt;request&lt;/managed-bean-scope&gt;
      &lt;managed-property&gt;
          &lt;property-name&gt;serviceLocator&lt;/property-name&gt;
          // propagates.......
  </code></pre>
  
  <p>When I checked the box, there is no alert. Where is the problem? I can't figure out it. Can anyone point out it?</p>
  
  <p>Thanks!</p>