We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Reload page by onchange client script

Rosy14
Kilo Sage

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();
}
15 REPLIES 15

Anand Kumar P
Tera Patron

Hi @Rosy14 ,

If below script not work  then try in different browser incognito by clearing cache.

 

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
if(newValue == '1'){
 location.reload();
}
}

 

 

Mark it as helpful and solution proposed if it serves your purpose.
Thanks,
Anand