6 Replies Latest reply on Aug 6, 2013 8:44 AM by ronny2013

    Check value of rich:inputNumberSpinner with JavaScript

    ronny2013

      Hi,

       

      I have a problem with the inputNumberSpinner.

      I want to do something if the spinner value is equals the maxvalue like the following example:

       

       

      <script language="javascript">

           function checkValue() {

              if (document.getElementById('spinner').value === document.getElementById('spinner').maxValue) {

                 document.getElementById('radioBtnGrp:0').checked = true;

              } else {

                 document.getElementById('radioBtnGrp:1').checked = true;

              };

                 return false;

              }

      </script>

       

      <rich:inputNumberSpinner id="spinner" step="0.5" maxValue="#{backingBean.maxValue}" value="#{backingBean.spinnerValue}" onchange="checkValue();"/>

      Can anyone help me please with this javascript?