scheduler lightbox with combobox support

hi



I want to put comboboxes into the detail page of the scheduler. The following code works (except the setting of the values) but the drop down appears behind the popup. I know this as the page is shorter than the dropdown.



Is there anyway of bringing the dropdown to the front?



thanks



Jeremy



    scheduler.form_blocks[“my_execs”]={

            render:function(sns){

                return “

” +

                        “Exec 1 " +

                        “
” +

                        “Exec 2 " +

                        “
”;

            },

            set_value:function(node,value,ev){

                window.dhx_globalImgPath = “imgs/”;



                

                var inps = node.getElementsByTagName(“SELECT”);

                

                dhtmlXComboFromSelect(“staff1”).enableFilteringMode(true, “combo.xml”, true, true);

                dhtmlXComboFromSelect(“staff2”).enableFilteringMode(true, “combo.xml”, true, true);

                

                inps[0].value=ev.person1 ||””;

                inps[1].value=ev.person2||"";    

            },

            get_value:function(node,ev){

                

                var inps = node.getElementsByTagName(“SELECT”);

                

                ev.person1 = inps[0].value;

                ev.person2 = inps[1].value;

                return ev.text;

            },

            focus:function(node){

                var a=node.childNodes[1]; a.select(); a.focus();

            }

        }


Hello,


to set value into the combo you should use combo API: setComboValue() method for example. Select doesn’t exist after combo creation:


set_value:function(node,value,ev){
window.dhx_globalImgPath = “imgs/”;
var inps = node.getElementsByTagName(“SELECT”);

var c1 = dhtmlXComboFromSelect(“staff1”);
c1.enableFilteringMode(true, “combo.xml”, true, true);
c1.setComboValue(ev.person1||"");

var c2 = dhtmlXComboFromSelect(“staff2”);
c2.enableFilteringMode(true, “combo.xml”, true, true);
c2.setComboValue(ev.person2||"");
},


Try to inrease z-index of the combo list to show combo list above the details form (dhtmlxcombo.css):


.dhx_combo_list{
z-index: 11000;






Hi



I had some troubles getting the values back out and also trying to recreate the details form



This seems to work though. The trick is to keep an array of the combo boxes



Jeremy



var ex = new Array();


scheduler.form_blocks[“my_execs”]={



render:function(sns){



return

” +



“” +




” +



“” +



”;



},



set_value:function(node,value,ev){


if (ex.length < 1){



ex[0] = dhtmlXComboFromSelect(“staff1”);



ex[1] = dhtmlXComboFromSelect(“staff2”);


ex[0].enableFilteringMode(true, “xml.xml”, true, true);



ex[1].enableFilteringMode(true, xml.xml", true, true);



}



ex[0].setComboValue(ev.person1||"");



ex[1].setComboValue(ev.person2||"");



},


get_value:function(node,ev){



ev.person1 = ex[0].getSelectedValue();



ev.person2 = ex[1].getSelectedValue();



return ev.text;



},



focus:function(node){



var a=node.childNodes[1]; a.select(); a.focus();



}



}


There is an issue with focus method. Try to use the following:


focus:function(node){

var a = ex[0].DOMelem_input;


a.select();


a.focus();

}



Is this working propably ???
May i see the xml.xml and would it also work with sql-statement?


Hi



it is actually using a dynamic web page to serve the XML but I simplified it for the example. You need to match the XML in the file in the examples and how you do it is up to you. I serve it out of the database in XML then transform it into the right shape using XSL



The file is here dhtmlx.com/docs/products/dhtmlxC … n/data.xml



 



Jeremy