cgishack
6 Jul 2007, 9:02 AM
Hello,
I am making a toolbar, with many menus.
But I need to get the menu ID the user clicked to pass to another function.
As you can guess... i am havin g issues getting the ID.
Here is my Code For the Menu Item
//*************************************************
// Help Menu
//*************************************************
var helpMenu = new Ext.menu.Menu
({
id: 'helpMenu',
items: [
new Ext.menu.Item({
text: 'Help Document',
handler: onItemCheck
}),
new Ext.menu.Item({
text: 'Support',
handler: onItemCheck
}),
new Ext.menu.Item({
text: 'About This Application',
handler: onAboutClick
})
]
});
function onAboutClick(item)
{
alert(item.getId());
}
After looking at the elements in FireBug item.getID() is not the correct id of the clicked item.
Does anyone have any ideas how i can get the id ?
Drew
I am making a toolbar, with many menus.
But I need to get the menu ID the user clicked to pass to another function.
As you can guess... i am havin g issues getting the ID.
Here is my Code For the Menu Item
//*************************************************
// Help Menu
//*************************************************
var helpMenu = new Ext.menu.Menu
({
id: 'helpMenu',
items: [
new Ext.menu.Item({
text: 'Help Document',
handler: onItemCheck
}),
new Ext.menu.Item({
text: 'Support',
handler: onItemCheck
}),
new Ext.menu.Item({
text: 'About This Application',
handler: onAboutClick
})
]
});
function onAboutClick(item)
{
alert(item.getId());
}
After looking at the elements in FireBug item.getID() is not the correct id of the clicked item.
Does anyone have any ideas how i can get the id ?
Drew