Opened 13 years ago

Closed 13 years ago

Last modified 11 years ago

#7493 closed defect (invalid)

dojo.query doesn't retrieve result for RadioButtons

Reported by: nunomartinsinet Owned by:
Priority: high Milestone: 1.2
Component: Dijit - Form Version: 1.1.1
Keywords: dojo.query, radio, buttons, forEach Cc:
Blocked By: Blocking:

Description (last modified by bill)

Using the dojo version 1.1.1 (latest revision from repository in tags) in FF3 with Ubuntu I tried the following code in a form with some input texts and radio buttons:

                            function(w) {
                                if(dijit.byId(widget)) {

Everything go fine for the input texts, but it retrieves me the following error because of the radio buttons:

"Error: Tried to register widget with id==XXX but that id is already registered"

I fixed the problem with the following change in my code:

                            function(w) {
                                if(dijit.byId(widget)) {

Thanks and keep up the good work,

You can contact me by email: [email protected]

Change History (2)

comment:1 Changed 13 years ago by bill

Description: modified (diff)
Resolution: invalid
Status: newclosed

Looks like dojo.query() is working correctly to me.

There's no reason to assume that the top node of a widget (this.domNode) has an id attribute. It's often true, but certainly not guaranteed.

You should call dijit.byNode() on each node returned from dojo.query()

comment:2 Changed 11 years ago by bill

Component: DijitDijit - Form
Note: See TracTickets for help on using tickets.