what is the difference between onload client script and onchange client script.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-18-2025 11:03 AM
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-18-2025 07:05 PM
- Both onLoad and onChange client scripts are used to run JavaScript code on the client-side (i.e., in the user's browser,client side), but they have different purposes and triggering conditions.
- onLoad Client Script:
- Trigger condition: Runs when a record form is loaded (opened or refreshed).
- Purpose: It’s typically used to manipulate the form or perform actions when the form first appears to the user. For example, setting default values or hiding/showing fields.
- Example: Hiding a field when the form loads.
- onChange Client Script:
- Trigger condition: Runs when the value of a specific field on the form changes.
- Purpose: It’s used to perform actions based on changes to a particular field, such as validating input or triggering other changes on the form when the field value is modified.
- Example: Displaying a message or updating other fields when a user selects a value in a dropdown field.
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution