Categories | Question details Back To List | ||||||||
Set selected item I have a combo box created and filled: window.dhx_globalImgPath="./Common/imgs/Combo/"; WindowsSkinCombo=new dhtmlXCombo("WindowsSkinZone","alfa1",328,'image'); WindowsSkinCombo.loadXML("./Common/imgs/Skins/Windows/windows.xml"); and <?xml version="1.0" ?> <complete> <option value="aqua_dark" img_src="./Common/imgs/Skins/Windows/Aqua_Dark.png">Aqua Dark</option> <option value="aqua_orange" img_src="./Common/imgs/Skins/Windows/Aqua_Orange.png">Aqua Orange</option> <option value="aqua_sky" img_src="./Common/imgs/Skins/Windows/Aqua_Sky.png">Aqua Sky</option> <option value="clear_blue" img_src="./Common/imgs/Skins/Windows/Clear_Blue.png">Clear Blue</option> <option value="clear_green" img_src="./Common/imgs/Skins/Windows/Clear_Green.png">Clear Green</option> <option value="clear_silver" img_src="./Common/imgs/Skins/Windows/Clear_Silver.png">Clear Silver</option> <option value="modern_black" img_src="./Common/imgs/Skins/Windows/Modern_Black.png">Modern Black</option> <option value="modern_blue" img_src="./Common/imgs/Skins/Windows/Modern_Blue.png">Modern Blue</option> <option value="modern_red" img_src="./Common/imgs/Skins/Windows/Modern_Red.png">Modern Red</option> <option value="standard" img_src="./Common/imgs/Skins/Windows/Standard.png">Standard</option> <option value="web" img_src="./Common/imgs/Skins/Windows/Web.png">Web</option> </complete> That is working fine. Now, I save the selected item by using: WindowsSkinCombo.getSelectedValue() But when I load the saved value, how do I then make the item be the currently selected one? I thought is was: WindowsSkinCombo.setComboValue(value) but that just changes the actual value, not make it the selected one. Answer posted by Support on Jul 28, 2008 02:42 The call of setComboValue must change both value and text of combo, if it doesn't work correctly for you - please try to use attached js file instead of original one. Attachments (1)
|