Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Alert not firing on onChange client script

sigmachiuta
Kilo Guru

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')

   

      }

1 ACCEPTED SOLUTION

clear cache and check to clear form data and that should resolve that part of it.


View solution in original post

39 REPLIES 39

Variable on which you are triggering this onchange is still on the form


right? You are not hiding it with a ui policy right?


ok silly question i know but is your pop up blocker turned off?


Raymond - so i think your actually on to something     .   I went into the item to copy the URL to have someone else test and the popup where it has the URL didnt show. It might have to do with the fact I clicked the 'dont allow this to show again' or whatever the msg is when i got stuck in the loop.   but i didnt think it would impact every popup.


clear cache and check to clear form data and that should resolve that part of it.


Closed down all browser windows cleared cache and tested again I am good now thanks!