1 Reply Latest reply on Aug 19, 2010 11:41 PM by sivaprasad9394

    using rich:element('id').disabled=true, inline javascript

    runner1

      Hello,

       

      Has anyone worked on using rich:element() to disable a button?

       

      For some reason, the following is giving me "document.getElementbyId(...) is null or not an object" on IE. My goal is to disable the cancelButton when the okButton is clicked. What am I missing? Please advise.

       

       

      <h:panelGrid columns="2" align="center">
      <a4j:commandButton id="okButton" value="Yes" action="yes" onclick="this.disabled=true;#{rich:element('cancelButton')}.disabled=true;" />
      <a4j:commandButton id="cancelButton" value="No" action="no" onclick="this.disabled=true" />
      </h:panelGrid>

       

       

      Thanks a lot!