0

Is there a way to access Captivate elements using JavaScript from the captivate script window?

I want to be be able to access the elements and dynamically control them.

Very strange, searched all over the net found nothing!

The window.cpAPIInterface only gives access to some predefined functions/slide or access to user-variables but not elements.

Thanks

j08691
  • 204,283
  • 31
  • 260
  • 272

2 Answers2

0

In the end it's just javascript so you can access anything that would normally be accessible in a script regardless of javascript or not. The problem is if you need to publish to both HTML5 AND swf. If you do have to publish to swf then I've found you have to stick with the cpAPIInterface or else things don't work.

user172586
  • 49
  • 7
0

As mentioned above, you can use javascript to access elements in HTML5 output but SWF is a lot more difficult. To show/hide/style an element using jQuery (which Captivate loads for you anyhow) you can select it by targeting the id that matches the element's name in Captivate plus the suffix "c". So to hide a Text Caption object named

My_Text_Caption

you would use

$("#My_Text_Captionc").hide().

Mark Smith
  • 104
  • 1
  • 5