Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by kim on Jan 19, 2009 19:23
open dhtmlx forum
dhtmlx combo default selected value

Hi i have few questions about dhtmlx COMBO

1. I am passing a XML file for a combo, when i use selected in <option value='303' selected>303</option> DHTMLX combo is not selecting and more over i got an error msg. saying that invalid XML format. if i remove selected the DHTMLX combo is working fine.

2. for DHTMLX combo i have filter and when user enter some thing if the element in the DHTMLX combo its filter to that element..which is fentastic feature. But when we need to change the value first we need to remove the current selected value by back space and then need to start the search from first character. How to i make the DHTMLX combo value to null as and when user click on the COMBO box and allow him to search

regards
kim
Answer posted by Support on Jan 20, 2009 07:45
>>1. I am passing a XML file for a combo
To be a valid XML it must be 
          <option value='303' selected="true" > 

>>2. for DHTMLX combo i have filter and when
Please check 
http://dhtmlx.com/docs/products/kb/index.shtml?cat=search&page=1&q=2683&ssr=yes&s=combo%20show%20open
It contains a sample of required functionality 
Answer posted by kim on Jan 20, 2009 16:45

Hi, example was wonderful.  But my question is you search for America in a list of countries and when i reenter into the DHTMLX control i need to remove(using back space) and type new country . Instead as soon as i enter into DHTMLX combo second time the America (which is previously selected) need to remove and custor need to be in the first position. Do you have any working example for this requirement.

 

regards

kim

Answer posted by Support on Jan 21, 2009 05:05
Something similar to next may work

combo.attachEvent("onOpen",function(){
    combo.unSelectOption();
  combo.setComboText("");
})

Each time when combo activate - it will clear its previous value.