what is the difference between onload client script and onchange client script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-18-2025 11:03 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-18-2025 03:25 PM
If you're new to ServiceNow, I recommend reviewing the content on the developer website.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-18-2025 03:37 PM
Hi @ImmadisettyP,
Refer the belo , also check the developer portal link shared by @Kieran Anson .
In HTML, "onload" is an event that fires when an entire webpage has finished loading, including all its elements like images and scripts, while "onchange" is an event that occurs when the value of a specific HTML element (like a text input or dropdown menu) is changed by the user
onChange - Client Scripts execute script logic when a particular field's value changes.
onLoad - Client Scripts execute script logic when forms are loaded.
-Thanks,
AshishKM
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-18-2025 05:56 PM
Hello @ImmadisettyP
onLoad means the Client Script runs when the form or page is loaded
onChange means the Client Script runs when something specific gets changed AND also when the form or page loads
Additional parameter for onChange client script is : isLoading - identifies whether the form is loading and also indicates that no fields have changed value. This parameter can only be true when the form is loading and no values have changed.
To know more about client scripts please go through - https://www.servicenow.com/docs/bundle/yokohama-api-reference/page/script/client-scripts/concept/cli...
If my answer helps you please mark it as helpful/correct.
Regards,
Debasis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-18-2025 06:24 PM
- onLoad means the Client Script runs when the form or page is loaded
- onChange means the Client Script runs when something specific gets changed AND also when the form or page loads
Additional parameter for onChange client script is : isLoading - identifies whether the form is loading and also indicates that no fields have changed value. This parameter can only be true when the form is loading and no values have changed.
Thanks
dgarad