AnsweredAssumed Answered

Same code to be triggered by more than one event

Question asked by stefancoe on Dec 21, 2015
Latest reply on Dec 21, 2015 by stefancoe

I have two events and I want them both to trigger the same code. The obvious answer is to have each event call the same function but i cant figure out how to do this. For example, say i am using the esri search dijit s:

 

on(s, "search-results", function(evt) {

      console.log('event fired');

      test(evt);

         });

 

I have confirmed that the event gets fired but the function test is not found. Is this a scope issue? Any ideas? Thanks!

 

-Stefan

Outcomes