Can the dojo.query
function be used to lookup widgets with certain attributes?
for instance, if I want to get a list of all input widgets with type hidden. It seems to me that dojo.query only works for DOM objects and is not meant to be used with objects. Is this correct?
For instance dojo.query('input[type=hidden]')
would normally work for regular HTML input fields but does not work for Dojo ones especially that they tend to be wrapped in DIVs, etc.
Thanks
Can the dojo.query
function be used to lookup widgets with certain attributes?
for instance, if I want to get a list of all input widgets with type hidden. It seems to me that dojo.query only works for DOM objects and is not meant to be used with objects. Is this correct?
For instance dojo.query('input[type=hidden]')
would normally work for regular HTML input fields but does not work for Dojo ones especially that they tend to be wrapped in DIVs, etc.
Thanks
Share Improve this question edited Nov 16, 2011 at 16:04 Ayyoudy asked Nov 16, 2011 at 15:24 AyyoudyAyyoudy 3,72112 gold badges49 silver badges66 bronze badges2 Answers
Reset to default 4You're right. For dijit, use dijit.registry to lookup the widgets in your page : http://dojotoolkit/reference-guide/dijit/registry.html
You can also specify nodes for dojo.query to search on.
I.E.
dojo.query('input[type=hidden]', widgetObject.domNode);
this may help, just throwing it out there