2 Replies Latest reply on Jun 11, 2013 2:30 AM by sheriman xavier

    Where does the ID like “pbG62d78562_2d4676_2d4b22_2d96b8_2d227d65ceaa9f_j_id1” come from?

    sheriman xavier Newbie

      I'm working with JavaScript and Facelets page and apply to gatein portal using portlet,

      here my code:


      <script type="text/javascript">
      function transfer() {
      .getElementById("strMol").value = editor.getMolfile();

      var newVal=document.getElementById("strMol").value;
      ("new val"+newVal);
      <h:form id="searchMoleculeForm">
      <h:inputHidden name="strMol" id="strMol" value="#{search.strMol}" />
      <rich:panel >
      <f:facet name="header">
                      Search The Molecule
      <div id="editor"></div>
      <h:commandButton value="substructure" action="#{search.subStructure}" onclick="transfer();" />
      <h:commandButton value="exact_similar" action="#{search.exactSearch}" onclick="transfer();" />
      <h:commandButton value="pharmacophore" action="#{search.pharmacore}" onclick="transfer();" />
      <h:commandButton value="shape" action="#{search.shapeSearch}" onclick="transfer();" />
      <script type='text/JavaScript'>
      var editor = chemwriter.loadEditor('editor');

      it not working, and when I view source code, other id coming with the id "strMol" something like this:

      <input id="pbG62d78562_2d4676_2d4b22_2d96b8_2d227d65ceaa9f_j_id1:searchMoleculeForm:strMol" type="hidden"

      so I put that ID inside


      and it started to work..

      my question is, where the other ID come from? how to solve this problem? because i tested to other machine this ID is not same.