Aveesh
Aveesh

Reputation: 65

call to javascript function doesnt work inside dojo require block (dojo ver 1.8)

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
}

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

Answers (1)

Craig Swing
Craig Swing

Reputation: 8162

If you want to call javascriptfn1, then you need to use parentheses.

javascriptfn1();

Same with javascriptfn2

Upvotes: 2

Related Questions