Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Nik on Dec 19, 2007 15:49
open dhtmlx forum
dhtmlxcombo enableFiltering from coldfusion

I am currently using the dhtmlxcombo enablefliteringmode with a dynamic coldfusion page. This is working fine on the insert page. However on the 'edit' page which should load the selected options by default is not working properly. I would like to know how can I load a default value in the combobox when using the enablefilteringmode.

I have tried inserting z.loadxml (which can load the selected option using <option value="x" selected="true">x</option> followed by z.enablefilteringmode(true,"getdata.cfm?var=#id#",true). Using these together makes me get exactly what I want but the problem is when the 'edit' page loads, it opens the dropdown automatically on load.

Any suggestions?
Answer posted by Support on Dec 20, 2007 02:52
>>. I would like to know how can I load a default value in the combobox when using the enablefilteringmode.
Instead of loading from XML you can just set correct values by JS API
Please check
    http://dhtmlx.com/docs/products/kb/index.shtml?cat=search&q=1413

>> is when the 'edit' page loads, it opens the dropdown automatically on load.
Can be fixed by using
combo.loadXML(url,function(){
    combo.closeAll();
});