I have a select field with id appointment_stylist_id. For some reason, the first one of these returns my element but the second one returns undefined:
console.log(dojo.byId('appointment_stylist_id'));
console.log(dijit.byId('appointment_stylist_id'));
Any idea why?
This is because
dojo.byIddoes what you want (find a DOM element with a particular ID), anddijit.byIddoesn’t do that.http://dojotoolkit.org/reference-guide/dijit/byId.html
See also
What the difference between dojo.byId and dijit.byId?