Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Section


Column
width50%

Parameters


  • HTML Template File
    This parameter is the file path to the HTML Template File relative to the modules directory, specified as a string. If the path is not qualified, the pathlist is used to search for the HTML Template File.

    Alternatively, this parameter can also be specified as an object with one of the following properties:
    • file - HTML Template File
    • html - the actual HTML string to use for the HTML template

  • Data (optional)
    This parameter is the data object to pass to the template. If omitted, all strongly typed fields declared within the global scope are passed to the template.
  • EJS options (optional)
    This parameter is a JavaScript object specifying EJS options as documented on www.ejs.co.


Column
width25%

Return Value


The user's response to the screen is returned as a JavaScript object representing the browser's post data.


Column
width25%

RPG Equivalent


EXFMT


...

Code Block
languagejavascript
titlePassing data parameter to the template
pjs.define("number", { type: "integer" });
pjs.define("square", { type: "integer" });
pjs.define("exit", { type: "boolean" });
 
while (!exit) {
  pjs.display("calculate_square.html", { number: number, square: square });
  square = number * number;
}

Video Tutorial

Widget Connector
width640
urlhttps://www.youtube.com/watch?v=VVHdnWsKp_0
height360