Solved! Go to Solution.
Okay, I noticed that if I did like this below, it works and the onChange event fires.
var myPalette = new dijit.ColorPalette({
palette: "7x10",
onChange: function (val) { alert(val); }
}, "divColorPalette");
<div id="divColorPalette"></div>
But if i do like this, it won't work. I have tried changing onChange to onchange and still it doesn't fire if I declare like this below.
dojo.connect(divColorPalette, "onChange", function (val) {
alert(val);
});
<div id="divColorPalette" data-dojo-type="dijit.ColorPalette"></div>
Okay, I noticed that if I did like this below, it works and the onChange event fires.
var myPalette = new dijit.ColorPalette({
palette: "7x10",
onChange: function (val) { alert(val); }
}, "divColorPalette");
<div id="divColorPalette"></div>
But if i do like this, it won't work. I have tried changing onChange to onchange and still it doesn't fire if I declare like this below.
dojo.connect(divColorPalette, "onChange", function (val) {
alert(val);
});
<div id="divColorPalette" data-dojo-type="dijit.ColorPalette"></div>