5.11.5 Items in the Attribute Settings window (JavaScript Plugin part)
The following describes the items in the Attribute Settings window.
- Organization of this subsection
(1) Plugin name text box
Enter a plugin name of up to 20 characters. By default, JavaScriptPlugin is displayed as the plugin name. You must always enter a plugin name. An error occurs in the following cases:
-
The entered character string contains control characters (ASCII codes 0x00 to 0x1F and 0x7F to 0x9F).
-
Duplicate plugin names exist in the same guide area.
-
An empty character is specified.
(2) URL text box
Enter the URL of the HTTP request to be called, which must be no longer than 8,190 characters. An error occurs in the following case:
-
The entered character string contains control characters (ASCII codes 0x00 to 0x1F and 0x7F to 0x9F).
(3) JavaScript text area
Enter the JavaScript to be executed on the server. An error occurs in the following cases:
-
The entered character string exceeds 65,535 characters.
-
The entered character string contains ASCII codes 0x00 to 0x09, 0x0B, 0x0C, 0x0E to 0x1F, and 0x7F.
- Important
-
Variables starting with ucnp are the system variables used with Navigation Platform. Do not use variables starting with ucnp in JavaScript.
(4) Execute in the browser check box
Specify whether to run JavaScript on a web browser (on the client-side).
If the JavaScript text area contains client-side JavaScript, select this check box to enable the JavaScript to run on a web browser (on the client-side).
If the JavaScript text area contains server-side JavaScript, clear this check box to enable the JavaScript to run on a server.
By default, this check box is cleared.
(5) Execute when return check. box
Specify whether to run JavaScript when clicking Back.
If this check box is selected, the JavaScript will run when clicking the Back button, or when returning by direct transition.
By default, this check box is cleared.
(6) Parameter settings area under "Input from parts"
You can specify an input parameter for JavaScript Plugin Parts.
-
Parameter Name text box
Enter a parameter name not exceeding 1,024 characters. You must always enter a parameter name. An error occurs in the following cases:
-
The entered parameter name contains ASCII codes 0x00 to 0x1F and 0x7F to 0x9F.
-
Duplicate parameter names exist in the same guide area.
-
An empty character is specified.
-
-
Default value text box
Enter the default value of the parameter, which must not exceed 1,024 characters. The default value is valid under the following conditions:
-
The parameter is not connected with a Guide Part.
-
The cached value passed by the Guide Part is an empty character.
An error occurs in the following case:
-
The entered default value contains control characters (ASCII codes 0x00 to 0x1F and 0x7F to 0x9F).
-
-
Tool Tip for the Parameter Name (Parameter description) text box
Enter a description of the parameter, which must not exceed 64 characters. You can also enter control characters. An error occurs in the following cases:
-
The entered character string exceeds 64 characters.
-
The entered character string contains ASCII codes 0x00 to 0x09, 0x0B, 0x0C, 0x0E to 0x1F, and 0x7F.
-
-
Add button
Adds a parameter. The new parameter is added to the bottom of the list. The maximum number of parameters is 50.
-
Delete button
Deletes the line where you clicked the Delete button.
(7) Parameter settings area under "Output to parts"
You can specify an output parameter for JavaScript Plugin Parts.
-
Parameter Name text box
Enter a parameter name not exceeding 1,024 characters. You must always enter a parameter name. An error occurs in the following cases:
-
The entered parameter name contains ASCII codes 0x00 to 0x1F and 0x7F to 0x9F.
-
Duplicate parameter names exist in the same guide area.
-
An empty character is specified.
-
-
Tool Tip for the Parameter Name (Parameter description) text box
Enter a description of the parameter, which must not exceed 64 characters. You can also enter control characters. An error occurs in the following cases:
-
The entered character string exceeds 64 characters.
-
The entered character string contains ASCII codes 0x00 to 0x09, 0x0B, 0x0C, 0x0E to 0x1F, and 0x7F.
-
-
Add button
Adds a parameter. The new parameter is added to the bottom of the list. The maximum number of parameters is 50.
-
Delete button
Deletes the line where you clicked the Delete button.
(8) Input Parameters
The cached value of the input parameter is set in the variable inside the JavaScript, and is referenced when invoked by a script inside the JavaScript. The default value of the input parameter is set before the JavaScript runs.
-
Example of how to write JavaScript
When the input parameter has the name inputparameter1 with the character string inputvalue1 set as its value, executing the script var inputVal = inputparameter1; causes the character string inputvalue1 to be set in the variable inputVal.
In addition, the input parameter is checked before the script inside the JavaScript is invoked. An error occurs in the following cases:
-
The URL of the HTTP request to be called exceeds 8,190 characters.
-
The URL of the HTTP request to be called contains control characters (ASCII codes 0x00 to 0x1F and 0x7F to 0x9F).
-
The JavaScript exceeds 65,535 characters.
-
The JavaScript contains ASCII codes 0x00 to 0x08, 0x0B, 0x0C, 0x0E to 0x1F, and 0x7F to 0x9F.
-
The parameter value contains ASCII codes 0x00 to 0x08, 0x0B, 0x0C, 0x0E to 0x1F, and 0x7F to 0x9F.
(9) Output Parameters
The value set in the variable inside the JavaScript is stored as the cached value of the output parameter.
-
Example of how to write JavaScript
If the output parameter has the name resultparameter1, executing the script var resultparameter1 = "resultvalue1"; causes the character string resultvalue1 to be set in the output parameter resultparameter1.