Reputation: 4956
I have the following code:
dijit.byId('patient').onchange(function(event){
var term=dijit.byId('patient').get('value');
patientList.url = ".calendar/search-patient?term="+term;
patientList.close();
})
What I am trying to do is to overwrite the default behaviour of the "onchange" event of a FilteringSelect dojo widget. The problem is that I get the error: "This deferred has already been resolved".
How could I overwrite the default behaviour of the "onchange" event? Thank you
Upvotes: 1
Views: 1246
Reputation: 5710
The dijit.byId
function returns a dijit object, and I don't think it has a member function onchange
that takes a function as parameter.
Try doing this instead:
dojo.connect(dijit.byId("patient"), "onChange", function(value)
{
patientList.url = ".calendar/search-patient?term=" + value;
patientList.close();
});
Upvotes: 2