How can i maintain selected value on tool bar combobox?

Dear Support Team!





I am using Dhtmlx tool bar, here i am using combo box if i select any item that event is refreshing to get the data form Database.

But i need to show selected item on the combo box which is in toolbar, even the page gor refreshed.



If i select page source i can’t see either name or id for that select box





code i am using in the xml



net

        tel

    



i am trying to send the data to toolbar select box like







When running the page on the browser select box dont have id or name, so i can’t assign the data.



Please help me how can i maintain the selected option on the select box of toolbar?



or



how can i assign through javascript?





Please help me in solving this



thanks

Uva

You can use code similar to next

var toolbar = new dhtmlXToolbarObject(…
toolbar.loadXML(url,function(){
toolbar.getItem(“0_select”).setSelected("<?=$_REQUEST[showreseller]?>")
});

Hi Thanks for your reply


I have use the code you sent but it is noe showing the selected item after page get refreshed.

i used code like below

aToolBar=new dhtmlXToolbarObject(document.getElementById(‘toolbar_zone’),‘100%’,16," “);
        aToolBar.setOnClickHandler(onButtonClick);
          aToolBar.loadXML(”/_toolbar.xml",function(){
                     toolbar.getItem(“0_select”).setSelected("<?=$_REQUEST[showreseller]?>")
    });
        aToolBar.showBar();

thanks
uva


Which value takes <?=$_REQUEST[showreseller]?> in your case?
To work correctly it must have the same value as option values in XML => “net” or “tel”

Please check attached sample.



1220030412.zip (17.1 KB)