3 Replies Latest reply on Apr 21, 2008 6:10 AM by Ilya Shaikovsky

    Changing value on input text disables all a4j:support

    Adam Jenkins Newbie

      Hi All,

      We have a page where we need to put some text in certain fields (as specified by a css class), and we also have a bunch of a4j:support event="onchange" attached to selectOneMenus. The javascript code for changing the values is

      var newElements = $$(".new-element");
      for(var i = 0; i < newElements.length; i++){
       newElements.setAttribute('value', '...');
       }
      


      we've noticed that the setAttribute call disables all the a4j:support elements on the page. if we remove the set attribute all the a4j:support works fine

      we've also tried:

      newElements.value = "...";
       newElements.writeAttribute('value', '...')
      


      and

      var attr = newElements.getAttributeNode('value');
       attr.nodeValue = '...';
      


      all works exactly the same...it disables the a4j:support event="onchange" that are attached to the selectOneMenu items

      very strange, can anyone offer any thoughts?