0 Replies Latest reply on Apr 22, 2010 5:44 PM by lenyas66

    Populating h:selectOneMenu from Javascript

    lenyas66

      I want to populate h:selectOneMenu using folder names I retrieve from SharePoint. I access SP using Javascipt SP API via Web service and it is working fine (see attached sample HTML file and JS library).

       

      I am not sure though, if it would work with h:selectOneMenu the same as with simple HTML "select" tags.

       

      Currently, I just do the following in javascript once I receive response from SP:

       

      var selectID = document.getElementById(select_id);

      ...

      selectID.options[selectID.length] = new Option(filename, filename);

       

      Could somebody confirm that it is possible to use similar logic with h:selectOneMenu?

       

      Thanks,

       

      Leonid