5 Replies Latest reply on Apr 1, 2008 9:22 AM by wesleyhales

    Problem with JSF- Component IDs and JavaScript Element-Id

    ameo

      Hello,

      I have a JSF- Portlet with Richfaces, newest versions.

      Here is my Problem.

      I have three form tags on a jsf page.

      <form id="formA" > ...
      <form id="formB" > ...
      


      Viewing the page a on browser the forms have the id

      <form id="jbpns_2fmyPortal_2fmyPage_2fmyPortlet:_viewRoot:inclTable:formA"
      <from jbpns_2fmyPortal_2fmyPage_2fmyPortlet:_viewRoot:inclTable:formB"
      


      I have a JavaScript library with a function, that want to get elements inside that forms with...

      document.getElementById(XXX) ;
      Here I get the error...bla bla "has no properties".

      So, what is the best way, to get the elements with javascript ?