0 Replies Latest reply on Nov 30, 2007 12:40 AM by thiagu.m

    how can I set the focus of a field on the RichFaces Modal Pa

      Hello,

      how can I set the focus of a form to a certain field on the RichFaces Modal Panel ? Of course I could do it with JavaScript. but it is not working.

      this is my code

      </script>
      function start()
      {
      var course = document.getElementById('mpform:name');
      alert(course);
       course.focus();
       return true;
      }
      </script>
      <rich:modalPanel onshow="start();" id="login" height="270" width="1000" zindex="2000">
       <a:form id="mpform">
      <h:inputText id="name" value="#{identity.username}" required="true" >
      </a:form>
      </rich:modalPanel >
      

      i use start() java script method for set focus the input field.
      i try to display the component id on alert window , but it give null.
      please any one help me ...

      By
      Thiagu.m