Here i using dhtmlscheduler(Timeline View Scheduler) and i am doing customization in lightbox.There i am adding two combo boxes, i need to change the second combo box values based on the first combo box selection,I not able to do the dynamically.Send me any example coding related to this problem.
You can create custom html section in lightbox
docs.dhtmlx.com/doku.php?id=dhtm … om_editors
In such case you will be able to control all aspects of rendered inputs, including onchange events and custom logic.
Dear Sir
I wrote following code.
scheduler.config.lightbox.sections=[
{name:"description", height:30, map_to:"text", type:"textarea" , focus:true},
{name:"location", height:20, type:"textarea", map_to:"details" },
{ name:"modality", height:21, map_to:"testcategoryid", type:"select",
options:scheduler.serverList("test")},
{ name:"department", height:21, map_to:"departmentid", type:"select",
options:scheduler.serverList("type")},
{ name:"employee", height:21, map_to:"employeeid", type:"select",
options:scheduler.serverList("types")},
i
//{name:"custom", height:23, type:"select", options:sections, map_to:"departmentid" },
{name:"time", height:72, type:"time", map_to:"auto"}
]
employee list have to load based on department id selection, plz guide me how to resolve this one.
In dhtmlxScheduler 3.5 you can use
function updateSecondList(){
var department = this.value; //selection from first list
var empList = scheduler.lightbox.get_select_control( scheduler.formSection("employee") );
//empList - select box from employee list
//now you can use any custom code to rebuild list of options in second list
}
{ name:"department", height:21, map_to:"departmentid", type:"select",
options:scheduler.serverList("type"), onchange:updateSecondList},
Hello ,
i have two combo . second combo is displayed data based upon 1st combo selction.
i used form_blocks for lightbox customization.
[code]{name:"hospital", map_to:"hospital", type:"combo" },
{name:"doctor", map_to:"doctor", type:"combo" },
{name:"user", map_to:"user", type:"combo" },[/code]
Ques :
1 : how can i send first combo select value to server ?
2. where can attch a event for custom combo box so that i can change combo filed value?
i know there onBlur,onKeyPressed events available.
please suggest some idea or example…
thanks in advance.
You can use onchange attribute, similar to the above code snippet.
From onchange handler of first combo, you can call
scheduler.formSection(“doctor”).node._combo to the the related combo object. After that you can use any methods of combo to load data from server side.
use of code to get onChange get error
scheduler.formSection("emc_type").node._combo.attachEvent("onChange",function(){
dhtmlx.message (scheduler.formSection("emc_type").node._combo.getSelectedValue());
});