- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2016 01:52 PM
i have a onChange catalog client script that DOES change the field values so it is running but it doesn't throw the alert.
if(newValue == 'No'){
alert(getMessage('test'));
g_form.setValue('foo' , 'No')
g_form.setValue('bar' , 'No')
}
--or
if(newValue == 'No'){
alert('test');
g_form.setValue('foo' , 'No')
g_form.setValue('bar' , 'No')
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2016 06:53 AM
clear cache and check to clear form data and that should resolve that part of it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2016 02:48 PM
yea yea i just didnt paste that
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2016 02:50 PM
when you alert new value before the if statement what value is shown?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2016 02:56 PM
Just remove that foo line and try. You are still changing the foo value from No to ''
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
//if foo is no set bar to No and hide foo
if(newValue == 'No'){
alert(getMessage('this is my alert'));
g_form.setValue('bar' , 'No')
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2016 03:01 PM
now its not even changing the value of bar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2016 03:11 PM
