Skip to main content
Nintex Community Menu Bar
Solved

Call Javascript function in included js file

  • March 12, 2018
  • 1 reply
  • 100 views

Forum|alt.badge.img+4

I have included a js file, and trying to call the function inside the js file but nothing happened, am i wrong syntax? thanks.

 

213790_pastedImage_1.png

 

213791_pastedImage_2.png

Best answer by jpmhuls

Hi Joe Lau‌,

To be sure that your called method works, the control it tries to access needs to be available in the DOM. As such you should call your function AFTER the Nintex Form has been loaded/rendered in the browser using the following snippet:

NWF$(document).ready(function(){

     abc();

});

1 reply

Forum|alt.badge.img+11
  • Scout
  • 357 replies
  • Answer
  • March 12, 2018

Hi Joe Lau‌,

To be sure that your called method works, the control it tries to access needs to be available in the DOM. As such you should call your function AFTER the Nintex Form has been loaded/rendered in the browser using the following snippet:

NWF$(document).ready(function(){

     abc();

});