5 Replies Latest reply on Sep 29, 2008 9:24 AM by Ilya Shaikovsky

    <a4j:commandButton> request isn't fired when validate javasc

    Khilesh Prasad Newbie

      Hello everybody,
      Any one help me why <a4j:commandButton> request isn't fired when validate some field using javascrip.

      function validate(){
      var txtId = document.getElementById('form:Txt');
      if(txtId.value==' ')
       return false;
       return true;
      <h:form id="form">
      <h:inputText id="Txt" value="#{bean.name}"/>
      <a4j:commandButton value="Ok" action="#{bean.action()}" reRender="form" onclick="return validate();"/>

      I am able to validate the input field it is working , but when i click on 'Ok ' Button the request isn't fired on action class.
      Plaese help me how to do this ..help me how to manage both validation and action i am using richfaces 3.2.1......