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
}
- Call to javascriptfn1 DOESNT execute, no error in console
-
//code after 1 executes (commented out)
-
Outside the REQUIRE, Call to javascriptfn2 DOESNT execute, no error in console
- //code after 2 executes (commented out)
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
If you want to call
javascriptfn1, then you need to use parentheses.Same with
javascriptfn2