Reputation: 65
Calls to aanother javascript function arent executing. Code:
function btn_click(){
require(["dojo/dom","dijit/registry"], function(dom,dijit){
dom.byId("tbm_notes_results").innerHTML="New HTML";
javascriptfn1;
//code after 1
});
javascriptfn2;
//code after 2
}
//code after 1 executes (commented out)
Outside the REQUIRE, Call to javascriptfn2 DOESNT execute, no error in console
Searching led me to the following
Dojo AMD: Can't call a function inside a require
I would appreciate if someone could explain it simpler for me (even a concept) and if possible tell me how to make it work (with/without my modules/package)
many thanks
Upvotes: 0
Views: 850
Reputation: 8162
If you want to call javascriptfn1
, then you need to use parentheses.
javascriptfn1();
Same with javascriptfn2
Upvotes: 2