0 Replies Latest reply on Nov 30, 2007 12:40 AM by Thiagu Mariappan

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

    Thiagu Mariappan Novice


      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

      function start()
      var course = document.getElementById('mpform:name');
       return true;
      <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" >
      </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 ...