Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on Nov 14, 2007 23:28
open dhtmlx forum
DHTML COMBO

hi

how to set defalut value in th gtmlcombo when page is load

plz advice

Thanks & Regards
siva
Answer posted on Nov 15, 2007 01:41
If you loading list of values from XML you can use "selected" attribute

<?xml version="1.0" ?>
<complete>
   <option value="1">one</option>
   <option selected="true" value="2">two</option>

when initializing from existing select - native selected value used
when adding options by javascript, selected one can be set by  
    combo.setComboValue(value);