When using "normal" Dom Events (such as onclick, onchange, etc), you are connecting to DomNodes. These are the native events found in every browser, normalized by dojo.connect. They pass around a 'true' event object, with e.target, e.clientX/Y, and other useful information.
When using "Dijit" Events, things are slightly different.
First and foremost, the event names are `mixedCase`, to avoid conflicts and confusion. A `dijit.form.Button` has an `onClick` method (capital-C), where as a plain DomNode [button] tag has an `onclick` event.
Next, the event information isn't passed along. Dijit events are just stubs providing a normalized API for the widget functionality.
Also, Dijit events are not "real" events. They do not bubble, and are not stoppable via .preventDefault. They are used as an alert mechanism. You must connect directly to the event, using the case-sensitive name:
dojo.connect(dijit.byId("foo"), "onClick", function(){ ... });
The way Dijit's templating works, often times there is a node with an id that mimics the initial domNode you specified. For intance, there is a "real" [button] node in dijit.form.Button's template, and whatever id passed is decorated on some node in the template.
This exposes the difference between dijit.byId() and dojo.byId(). Consider the following markup:
One would dojo.connect(dojo.byId("foo"), "onclick", function(event){ ... }). You are finding a DomNode with id="foo", and applying an `onclick` listener. The above button, however, it's a Dijit. We can turn it into one very easily:
var button = new dijit.form.Button({ },"foo");
This creates a dijit.form.Button with an id of "foo" from the node with id="foo". We access the _widget instance_ by using dijit.byId:
var buttonInstance = dijit.byId("foo"); // an object, a dijit instance
Coincidentally, there is still a "real domNode" somewhere, with the id="foo". This is where the confusion comes in. Getting that domNode is easy:
var widgetNode = dojo.byId("foo"); // a domNode
If we connect to that node's dom Event 'onclick', things fall apart:
dojo.connect(dojo.byId("foo"), "onclick", function(event){ ... });
Because of the nature of Dom events (bubbling), any click inside of the domNode will execute the function. This is not what we want. The Dijit Button does a lot of work to fire it's synthetic `onClick` event at the right time, with [enter] or an actual [click]. This is all internal, and exposed via it's `onClick` public API.
You should not mix Dijit Events and Dom Events.