setting text inside Web Object specific div
Hello! I am trying to figure out a way to take text from a Text Caption and assign it to a specific div inside of a Web Object.
I've tested it with a regular html site with an embedded iframe and it works great, but with Captivate i cant get the text pushed to a web object.
The WebObject is named CC_box and inside of it there's a div with an id of "text" - that's where the text needs to go. The Text Caption that holds the text is named CC_source_1 for first slide, then CC_source_2 for next, etc.
Here is my code:
var slideNumber = window.cpAPIInterface.getCurrentSlideIndex(); //gets current slide number
var ccText = document.getElementById("CC_source_" + slideNumber).textContent; //extracts text from a text caption on a current page - works great
$("#CC_box).contents().find("#text").html(ccText); //this line of code works perfectly in HTML, but not in Captivate
What is a proper way to access that div inside the web object from Captivate?
Thank you!
