<toolbarbutton id="list1" type="menu">
<menupopup id="test2" onclick="alert(this.popupNode.value)">
<menuitem value="1" />
<menuitem value="2" />
<menuitem value="3" />
</menupopup>
</toolbarbutton>
I am trying to catch in the alert the value of the clicked menuitem.
It seems that it doesn't work at all in a toolbar like it does in a
document or a side bar.
Has anyone any idea how to do this ?
Thank you for your help.
François
I'd be surprised if that code did what you want anywhere you mention.
Better would be to use event.target.value.
> Better would be to use event.target.value.
... and that was SO simple :-)
Thank you Dave
François
And you should be using the command event, not the click event.