Hello
I was trying to put comboselect in add events in schedular. Can anybody help me with understanding that? I’m using conector for PHP and database MySQL.
I wanted to add and edit a events with comoselect. I need 3 comoselect where 2 of them are connected (if you choose smth from first comoselect to have a reloaded seconde comboselect ) and I need third comoboselect not in common with first 2. What I wanted to make is to add evenets or edit events.
First comboselect is car brand and the seconde is for car models. Third is for clients.
Please can anybody show me how to make this. Maybe sombody can put the script of that? Thank you for help and understandign. Im amature with dhtmlx.
Hi I have something similar in my calendar:
[code]//custom form blocks for pop up (combo dropdowns)
scheduler.form_blocks[“my_editor”]={
render:function(sns){
return "<div class='dhx_cal_ltext' style='height:65px;margin:0px;'><table border='0' width='100%' cellpadding='0' cellspacing='0'><tr><td><div style='color: navy; float:left;'>Customer:</div><div id='combo_zone_customer' style='width:450px;float:right;'></div></td><td width='5px'></td></tr><tr><td><div style='color: navy;float:left;'>Address:</div><div id='combo_zone_address' style='width:450px;float:right;'></td><td width='5px'></td></tr><tr><td><div style='color: navy;float:left;'>Contact:</div><div id='combo_zone_contact' style='width:450px;float:right;'></td><td width='5px'></td></tr></table><input type='hidden'></div><input type='hidden'></div><input type='hidden'></div>";
},
set_value:function(node,value,ev){
var inps = node.getElementsByTagName("INPUT");
if (!node.combos){
window.dhx_globalImgPath = "../../combo/imgs/";
var comboA = node.comboA = new dhtmlXCombo("combo_zone_customer","dummy","450px");
comboA.enableFilteringMode(true, "../../combo/autocomplete.asp?uid=<%=uid%>&ter=<%=currterr2%>", true, false);
comboA.loadXML("../../combo/autocomplete.asp?uid=<%=uid%>&ter=<%=currterr2%>",function(){
comboA.setComboValue(ev.customer_drop||"");
comboA.attachChildCombo(comboB, "../../combo/autocompleteloc.asp");
comboA.attachChildCombo(comboC, "../../combo/autocompletecont.asp");
node.comboA.showSubCombo(node.comboA, true);
});
var comboB = node.comboB = new dhtmlXCombo("combo_zone_address","dummy","450px");
comboB.readonly(true);
comboB.loadXML("../../combo/autocompleteloc.asp",function(){
comboB.setComboValue(ev.address_drop||"");
});
var comboC = node.comboC = new dhtmlXCombo("combo_zone_contact","dummy","450px");
comboC.readonly(true);
comboC.loadXML("../../combo/autocompletecont.asp",function(){
comboC.setComboValue(ev.contact_drop||"");
});
node.combos = true; //added! // CHANGED
return;
}
node.comboA.setComboValue(ev.customer_drop||""); // CHANGED
node.comboA.showSubCombo(node.comboA, true);
node.comboB.setComboValue(ev.address_drop||""); // CHANGED
node.comboC.setComboValue(ev.contact_drop||""); // CHANGED
},
get_value:function(node,ev){
var inps = node.getElementsByTagName("INPUT");
ev.customer_drop= node.comboA.getComboText();
ev.address_drop= node.comboB.getComboText();
ev.contact_drop= node.comboC.getComboText();
ev.cusid= node.comboA.getSelectedValue();
ev.cusloc= node.comboB.getSelectedValue();
ev.cuscont= node.comboC.getSelectedValue();
},
focus:function(node){
var inps = node.getElementsByTagName("INPUT");
inps[0].focus();
}
}[/code]
and then in the lightbox sections:
{ name:"customer", map_to:"dummy", type:"my_editor" }
I also have the following in my header:
[code]
[/code]You obviously need to modify the above to suit your autocomplete sources, locations of combo dropdown scripts etc, but the above is working for me.
1 master dropdown, and 2 sub dropdowns which take the id of the master as their parent value.
(select customer, then the customer addresses and contacts populate the 2 sub dropdowns)
Hope this helps!