isabeln
#1
I need to:
- set the value of a combo to the first item
- get the value of a combo when user select one of the options
call you tell me which events can I attach to a combo and which methods should I call to do the above?
I tried attaching events:
-onXLE: it works fine
-onChange: it doesn’t work
-onSelectionChange: it doesn’t work
onchange event will work.
if combo config { view:“combo”, id:‘mycombo’,…}, you may use the following methods:
- to set event and get value
$$(“mycombo”).attachEvent(“onchange”, function (){
var value = $$(“mycombo”).getValue();
})
- to select the first option
var list = $$(“mycombo_list”);
var id = list.first();
$$(“field_e”).setValue(id);
isabeln
#3
Thanks it worked (the event name had to be lowercase)