< Previous Article Next Article >


The pjs.call() API calls another Profound.js module. The module is loaded with the pjs object injected, so you have access to the pjs API, and the function designated with exports.default is then called.

The first parameter is the name of the Node.js module. Subsequent parameters are passed as arguments to the exports.default function.


if (btnViewCustomer) {
  pjs.call("displayCustomerModule.js", customerNumber);

if (btnEditOrder) {
  pjs.call("editOrderModule.js", orderNumber, customerNumber);

If the exports.default function returns a value, this value is also returned from pjs.call().


Have questions about this topic? Ask for help on our Profound.js Spaces Discussion Forum.

< Previous Article Next Article >