ServiceNow Blog 01: What is client-side scripting? Client-side scripting examples.

Community Alums
Not applicable

1 ) What is client-side scripting

  • Runs the client-side scripting when events occur on the browser like loading of form, form submission, change of field value on the form.
  • Run JavaScript on the client (web browser) when client-based events occur, such as when a form loads, after form submission, or when a field changes value.
  • The table of client script is”sys_script_client”.
  • Following are examples of client scripts:
  • Shows an alert when the form loads.
  • Validate form data
  • Show/hide choices of fields
  • Hide/show section
  • Set a value on the form
  • Confirmation on submit

2 )Client-side scripting examples:

  • Ajax client scripting.
  • Client scripts
  • UI Policy
  • Service catalog UI Policy
  • UI Actions
  • UI context Menus
  • Validations scripts

3)Client-side Glide Classes

  • Glide Ajax
  • Glide Dialog window
  • Glide form
  • Glide list
  • Glide Menu
  • Glide User

4 ) Client-side API :

  • Glide Ajax: Glide Ajax is used to call server-side code from client. Glide Ajax instance is called with Glide Ajax constructor. It uses client scripting. Syntax = var ga = new Glide Ajax (<script include>)
  • Glide Form: Glide form is used to customize form & perform some activities on form. The object which is used to access the Glide form Methods is g_form. It is used only by clients.syntax =g_form.<GlideFormMethod>(<parameter>).
  • Glide User: GlideUser is used to get information about the logged in user. The object which is used to access Glide User methods in g_user. It is used only by clients. Syntax= g_user. <GlideUserMethod()>.
  • GlideDialogWindow: GlideDialogWindow is used for displaying a dialog in the current window and frame.it is used only in client.

 

0 REPLIES 0