Copy link to clipboard
Copied
In the JavaScript Script_Window I'm trying to do something like this:
var color = "00FF00";
window.cpAPIInterface.setVariableValue("link", "<font color='#" + color + "'><u>Test</u></font>");
Using a button, On Success -> Execute JavaScript, I can use the sample script with no issues. But when I Execute Advanced Actions that contains an action to Execute JavaScript, the sample script breaks. In the Advanced Actions, the sample script is changed every time I try to Update Action. Whenever I'm debugging in browser I get an "Unterminated string constant" error. I have tried escaping the single quote with a slash, but it still doesn't work. Is this just a "feature" of Captivate? I need to do other actions so I need to make it work in an Advanced Action.
Copy link to clipboard
Copied
I would put your script in an external function and call that function in the advanced action JS window.
I execute all of my JS in and external js file. There are too many limitations in the Captivate js window.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more