---
sourceDocument: Xanadu API Reference
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/api-reference

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# Client-side scripting

# Client-side scripting {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

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 client-side [Glide](https://servicenow-prod.fluidtopics.net/1Ecz6jEydqWGOuHKqLTXsQ "The ServiceNow Glide classes expose JavaScript APIs that enable you to conveniently work with tables using scripts.") API provides classes and methods that you can use in client scripts.

## Before you begin {#client-side-scripting-overview__section_eg4_5b2_vhb}

Understand the limitations of your scripting environment. For example, client scripts run on
forms in the Service Portal or Mobile
environments can only include certain APIs. For more information, see [Mobile client GlideForm (g form) scripting and migration](https://servicenow-prod.fluidtopics.net/iiMI0QdaVqz1hn2LLGSMYw "Client scripting for mobile is identical to scripting for the web, with some exceptions. All new scripts must conform to certain guidelines. The following items are affected on the mobile platform: client scripts, UI policies, navigator modules, and UI actions.").
* **[Client-side scripting design and processing](https://servicenow-prod.fluidtopics.net/e7lMvDk8geQOlE30gdPZUw#client-script-best-practices)**   
  Well-designed client scripts can reduce the amount of time it takes users to complete a form.
* **[Client scripts](https://servicenow-prod.fluidtopics.net/F_3kfh2JTjtdaMCXqWbXIQ)**   
  Client scripts allow the system to 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.
* **[UI scripts](https://servicenow-prod.fluidtopics.net/wRIgGGLtuNffgOnKwS5uEw#c_UIScripts)**   
  UI scripts provide a way to package client-side JavaScript into a reusable form, similar to how script includes store server-side JavaScript. Administrators can create UI scripts and run them from client scripts and other client-side script objects and from HTML code.
* **[Catalog client scripts](https://servicenow-prod.fluidtopics.net/w66434OCuC6GXO0bVuDcOQ#c_CatalogClientScriptCreation)**   
  Client-side scripts can add dynamic effects and validation to forms. Scripts can apply to service catalog items or variable sets, allowing administrators to use the same functionality that is available on other forms.
* **[Mobile client GlideForm (g form) scripting and migration](https://servicenow-prod.fluidtopics.net/iiMI0QdaVqz1hn2LLGSMYw)**   
  Client scripting for mobile is identical to scripting for the web, with some exceptions. All new scripts must conform to certain guidelines. The following items are affected on the mobile platform: client scripts, UI policies, navigator modules, and UI actions.
* **[AJAX](https://servicenow-prod.fluidtopics.net/cdtoLVychgPQghQyCrKyDw#p_AJAX)**   
  AJAX (asynchronous JavaScript and XML) is a group of interrelated, client-side development techniques used to create asynchronous Web applications.

