Hi,
i have a problem with attachevent method of an object inside a popup.
i have this code:
dhx.ready(function(){
dhx.ui.fullScreen();
dhx.ui({
id:"detailViewComment",
view:"form",
css: "overall",
elements:[
toolbar,
{type:"clean",
cols:[
{width:30},
entries,
{width:30}
]
}
]
});
dhx.ui({
view:"popup",
id:"menu_status",
height:120,
body:{view:"form",
id:"form_status",
name:"form_status",
elements:[
{
view:"combo",
id:"txtbox_Status",
name:"txtbox_Status",
height:50,
click:"status_list",
label: 'Status',
data:[......],
select:true,
y_count:"3"
},
{ view:"button", type:"form", name: "save_stat",
id:'save_stat', label: 'Save', align:"left", click:"save_status;" }
]}
}).hide();
dhx.ui({
view:"popup",
id:"menu_assigned",
height:150,
width:400,
body:{view:"form",
id:"form_assigned",
name:"form_assigned",
elements:[
{view:"radio",
name:"to",
id:"to",
align:"center",
labelWidth:40,
labelAlign: "left",
value:"2",
options:[
{ label:"User", value: "1", id:"opt1"},
{ label:"Group", value: "2", id:"opt2" }
]},
{view:"combo",
name: "txtbox_Assign",
yCount:"5",
id:'txtbox_Assign',
label:'Assign To',
data:[..... ],select:true
},
{ view:"button",
type:"form",
name: "save_assign",
id:'save_assign',
label: 'Save',
align:"left",
click:"save_assign;"
}
]}
}).hide();
$$("txtbox_Status_list").attachEvent("onitemclick",function(){ [u]------here is the problem[/u]
var id =$$("txtbox_Status").getValue();
var name = $$("txtbox_Status_list").item(id).value;
$$("lbl_status").setValue(name);
$$("menu_status").show();
});
});
function close_modal(){
this.getParent().getParent().getParent().close();
}
});
so i put the attachevent outside dhx.ui and inside dhx.ready.
the method is called to an object inside the popup (perhaps here is the problem)
i dont understand what am i doing wrong.