#4998 closed defect (invalid)
Toolbar menu item events
Reported by: | guest | Owned by: | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Dijit | Version: | 0.9 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
In the attached file, the event function, the function gets called, but I don't know how to retrieve the event source from the event. Also, how do you subscribe to events generated by a menuItem or any other event emiting source?
And there is little or no documentation on this, either in the tests or elsewhere. All the docs appear to approach the problem from a general point of view. The devil is in the details guys.
Attachments (2)
Change History (9)
Changed 15 years ago by
Attachment: | dijitTestToolbarDropDownButton.html added |
---|
comment:1 follow-up: 2 Changed 15 years ago by
comment:2 Changed 15 years ago by
Replying to bill:
What do you mean by "the event source"?
By the way, it would be easier if you just did:
var menuItem1 = new dijit.MenuItem({ label: "Save", onClick: foobar });
I've tried that and unless I am missing something, it does not work.
comment:3 Changed 15 years ago by
Check it out. That is the obvious solution and maybe I am not doing something, but that syntax does not invoke the foobar function.
comment:4 follow-up: 5 Changed 15 years ago by
var menuItem1 = new dijit.MenuItem({ id:"menuItem1", label: "Save", onClick:foobar, iconClass:"dijitEditorIcon dijitEditorIconSave" document.createElement("div"));
Nothing happens. That is why I chose the other methodology.
comment:5 Changed 15 years ago by
Replying to guest:
var menuItem1 = new dijit.MenuItem({ id:"menuItem1", label: "Save", onClick:foobar, iconClass:"dijitEditorIcon dijitEditorIconSave" document.createElement("div"));
Nothing happens. That is why I chose the other methodology.
By event source I mean: which menuItem generated the event? When I try to find it by dojo.byId("menuItem2"), it doesn't get the menuItem. I have tried looking for it in the MouseEvent??, and it does not come up?
comment:6 Changed 15 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
I attached an example using onClick.
What do you mean by "the event source"?
By the way, it would be easier if you just did: