LibraryEASYProcess Reference ManualProcessesServicesHtmlWorkshopRegisterJavaScript

RegisterJavaScript Overview

“RegisterJavaScript” is a service that can be used to register a javascript code on the page.

The benefit of using RegisterJavaScript to other ways (other ways are to use external JavaScript files or use HTMLGenricControl field), is that you can register the script based on defined conditions. Example: we can use other EASYProcess services to check whether we want to run the script or not.

RegisterJavaScript Use Examples
JavaScriptThis is the javascript code that we would like to register to the page.

KeyThis is the key for the javascript that we are registering.

RegisterTypeThis is the type of the register.

RegisterJavaScript Use Examples

The service RegisterJavaScript is used to register or run a javascript code snippet from a process.

Basic RegisterJavaScript Use

In this example we have a list section with user names and their statuses. The fields above the list section are used as filters to search through the users. We are using “RegisterJavascript” service to clear the filter fields.

The service “RegisterJavascript” can be found under the “HTMLServices”. We can drag over the service to use it.

Here’s a closer look at the service inputs in this button process:

Notice that we are using <script> tags before starting our JavaScript code.

RegisterType and Key

The input “Key” is used to keep the registered script unique. This is useful when we are registering more than one script.

The input “RegisterType” what type of script we would like to register. Valid register types are :

  1. RegisterClientScriptBlock: This type registers the script on page runs every time the function is called.
  2. RegisterStartupScript: This type runs only on startups (when the page loads).
  3. RegisterOnSubmitStatement: This type is for registering script OnSubmit.


Powered by EASYProcess (© 2022 K-Rise Systems, Inc).