Hello,
First, thanks for all the help in the forum - you make great products and the assistance in the forums is very valuable.
I have a dhtmlxCombo that is loaded from XML in a dhtmlxScheduler custom details form. I also have a link that opens a popup window that allows the user to edit the details in the drop down, so I need to get the dhtmlxCombo XML to refresh once it’s updated. I’ve setup a function on the page that renders the scheduler to reload the combo box, and made the popup window call that function. The problem seems to be “getting at” the dhtmlxCombo drop down object. Normally, I think this would work by doing something like combo.clearAll(true);combo.loadXML(“xml”); but I’m not sure how to do this with the way the combo gets loaded in the scheduler. Any help is appreciated.
The dhtmlxScheduler setup for the combo looks like this (xxx are real values):
scheduler.form_blocks["combo"]={
render:function(sns){
var height=(sns.height||"23")+"px";
var html="<div data='"+sns.xml+"' class='dhx_cal_ltext' style='height:"+height+";' id='"+scheduler.uid()+"'></div>";
var html=html+"<div><a href=\"/customers/new\" onClick=\"window.open('xxx'); return false\">Create new customer</a></div>";
return html;
},
set_value:function(node,value,ev){
if (!node.combo){
node.combo = new dhtmlXCombo(node.id,"dummy","553px");
node.combo.enableFilteringMode(true);
node.combo.loadXML("xxx",function(){node.combo.setComboValue(value||"");});
return;
}
node.combo.setComboValue(value||"");
},
get_value:function(node,ev){
return node.combo.getSelectedValue();
},
focus:function(node){
node.combo.DOMelem_input.focus();
}
}
Then I have my update function:
function updateCustomerCombo() {
customer.combo.clearAll(true);
customer.combo.loadXML("/customers.xml");
}
Which gets executed onLoad on the final page of the popup window flow by doing a window.opener.updateCustomerCombo().
Any help is appreciated. Thanks!
Chris