I can't get onChange to fire for dijit.form.Select
Posted
by user306462
on Stack Overflow
See other posts from Stack Overflow
or by user306462
Published on 2010-04-01T14:31:40Z
Indexed on
2010/04/01
14:33 UTC
Read the original article
Hit count: 739
I seem unable to correctly attach the onchange event to a dijit.form.Select widget. However, I am new to web development, so I could be doing something completely idiotic (although, as best I can tell (and I've read all the docs I could find) I'm not). I made sure the body class matches the dojo theme, that I dojo.require() for all the widgets I use (and dojo.parser), and still, nada. The code I'm using is:
dojo.addOnLoad (function () {
var _query = dojo.query('.toggle');
for (var i=0; i < _query.length; i++) {
dojo.connect(_query[i], 'onchange', function (ev) {
console.log(ev + ' fired onchange');
});
}
});
Any help at all would be appreciated.
© Stack Overflow or respective owner