Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
435
create comboboxes programmatically at runtime?
posted

Is it possible to built multiple comboboxes at runtime programatically? I'm doing:
  var root = document.getElementById('root');
        var selectLength = document.getElementsByTagName('select').length;
        var selectlist = document.createElement('select');
        selectlist.id = "select" + selectLength;
        selectlist.onclick = 'alert();';
        
        var ops = new Array("first", "second", "thrid", "fourth", "fifth");
        for (var i = 0; i < ops.length; i++) {
            var o = document.createElement("option");
            var t = document.createTextNode(ops[i]);
            o.setAttribute("value", ops[i]);
            o.appendChild(t);
            selectlist.appendChild(o);
        }
        root.appendChild(selectlist);

And need the ability to add multiple comboboxes.  I may need to create 10 or more boxes based upon the selected value of the prior selected value,  Can this be done using the igCombo?

Thanks