Reload page by onchange client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2024 11:50 PM
below code not working.
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
//Type appropriate comment here, and begin script below
if (newValue == 1)
location.reload();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2024 12:39 AM
even msg is also not coming
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2024 01:04 AM
I have just created an integer field and Client script and it is working as expected when I am changing the field value manually.
Could you please explain how you are doing the changes on that field in the form?
Mark this as Helpful / Accept the Solution if this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2024 12:28 AM
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
//Commneted is loading function try now
//if (isLoading || newValue === '') {
//return;
//}
if(newValue == '1'){
location.reload();
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2024 12:44 AM
not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2024 12:58 AM
Hello @Rosy14 ,
Client script will work on form changes, if you are setting value form UI action and want to reload the page on the basis of value change it will not work.
I will suggest use "location.relod(true)" in UI action script