Script includes

Let us now create our first script include. The script include usually comprises a set of JavaScript functions that can be called from any server-side scripts. Moreover, it is possible to mark a script include to be client callable, thereby making it possible for client-side scripts to make remote (AJAX) calls to script include code.

As part of this book, we will create a script include that will be client callable and create a client script that will make a call to the function defined in the script include when the value of the Destination form field changes. The client script will initiate an AJAX call to our script include and will tell the end user about the weather conditions in their destination location.

As of now, ...

Get ServiceNow Application Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.