I'm running into a problem using dojo.connect() to connect an 'onclick' event with this button:
<button dojoType="dijit.form.Button" widgetId="inbox_button" id="inbox_button">Inbox</button>
and the code making the connection is:
var inbox_button=dojo.byId("inbox_button");
dojo.connect(inbox_button,'onclick',function(){
var container=dijit.byId("center");
container.addChild(new dijit.layout.ContentPane({region: "left", content: "...", style: "width: 100px;"}))
});
However, instead of executing the function when the button is clicked, ANY onclick event triggers the function, and I end up with a lot of children containers.
Even though I'm pretty certain the .connect() function should be available as part of dojo's base functionality, I've 'required' it explicitly:
dojo.require("dojo._base.connect");
Any ideas as to why this might be happening?