BeginJS

Purpose:

Open a block containing JavaScript code. The block ends with EndJS.

Category:

Advanced

Syntax:

BeginJS

Example:

BeginJS

  alert("Hello!, this is a JavaScript Message");

EndJS


EndJS

Purpose:

Close a block containing JavaScript code. The block starts with BeginJS.

Category:

Advanced

Syntax:

EndJS

Example:

BeginJS

  const arrayNumbers = [2, 1.5, 3, 2.7];

  alert("Maximum: " + Math.max(...arrayNumbers)); //-> 3

EndJS


   Communicating NeoScript and Javascript

SetVar [myOldVisualNeoVar] 1


BeginJS

  let myJavascriptVar = $App.myOldVisualNeoVar;

  alert("Value myJavascriptVar: " + myJavascriptVar); //-> 1


  $App.myNewVisualNeoVar = myJavascriptVar + 10;

EndJS


AlertBox "Value myNewVisualNeoVar:" [myNewVisualNeoVar] "" //-> 11


Tip: type 'javascript' in the search box of this Help Guide.

Created with the Personal Edition of HelpNDoc: Keep Your Sensitive PDFs Safe with These Easy Security Measures