I am having the below on change client script running on a device type variable, need to update the
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2025 06:00 AM
I am having the below on change client script running on a device type variable, need to update the countries in one new system property and need to call it in this client script.
Please help me in script.
Thanks in advance.
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading) {
return;
}
g_form.clearOptions('delivery_location')
var usrcountry = g_form.getValue('country')
if((newValue == 'Standard Office/' || newValue == 'Standard Office Laptop 15"' || newValue == 'Standard Mobile Workstation' || newValue == 'Convertible Laptop' || newValue == 'HP Series Pro 524pn - 24"') && ( usrcountry == 'Canada' || usrcountry == 'United States of America' || usrcountry == 'Finland' || usrcountry == 'Estonia' || usrcountry == 'Ireland' )){
g_form.addOption( 'select_delivery_location' , '' , '-- None --' );
getMessage('Home',function(msg){
g_form.addOption('select_delivery_location','Home',msg)});
//g_form.addOption('select_delivery_location','Home','Home')
getMessage('SE Office',function(msg){
g_form.addOption('select_delivery_location','SE Office',msg)});
} else {
g_form.addOption( 'select_delivery_location' , '' , '-- None --' );
getMessage('SE Office',function(msg){
g_form.addOption('select_delivery_location','SE Office',msg)});
}
//Type appropriate comment here, and begin script below
}
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2025 07:51 AM - edited 02-07-2025 10:06 AM
I suggest you look at OOB client scripts, where the Script contains 'GlideAJax' to properly call the script include and process the response. Your lines 7-10 aren't working. See: