- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2014 11:28 AM
I have an application catalog item which has an onchange catalog client script.
The problem is that the onchange catalog client script won't execute, even when I change the value in the variable on the form.
I've boiled it down to a simple alert for testing:
function onChange(control, oldValue, newValue, isLoading) {
alert("huha!");
if (isLoading || newValue == '') {
return;
}
//Type appropriate comment here, and begin script below
}
Here's the catalog client script:
Whenever I change the value of the variable data_center, I expect to get an alert saying "huha!". But I get nothing.
I don't think the script is executing. I turned on the Javascript debugger, but I'm not seeing any reference to this script.
Any ideas?
Thanks in advance for any light on this for me. I look forward to hearing from y'all!
Solved! Go to Solution.
- Labels:
-
Service Mapping

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2014 11:46 AM
Usually when I see a client script or ui policy not executing it's because there is a client script on the same table or item/variable set with an error. I would take a look at your javascript console and see if there are any errors on the page. Once a client script throws an error, none of the subsequent client scripts or ui policies will run.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2014 11:46 AM
Usually when I see a client script or ui policy not executing it's because there is a client script on the same table or item/variable set with an error. I would take a look at your javascript console and see if there are any errors on the page. Once a client script throws an error, none of the subsequent client scripts or ui policies will run.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2014 12:04 PM
Ding! Ding! Ding! DIng!
Thank you Brad! You are right, you are absolutely correct!
The issue was another catalog client script which took an error and prevented all other scripts from firing.
I deactivated the the other client scripts and reran. My script ran.
Then I reactivated them one by one until I found the problem script.
The problem script was onLoad script to display the help text for several variables.
As part of my changes to the form I had removed the help text for one variable which was no longer needed.
I did attempt to debug using the Javascript console, but I'm clearly in need of some training there.
Thanks again for you advice Brad! I think you set a new speed record for the correct answer!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-23-2017 06:45 AM
Hey Brad - I was running into an odd issue on one of our catalog items. I stumbled across your tidbit and it pointed me in the right direction. Thanks for sharing this info!