Skip to main content
teresah9791625
Known Participant
September 20, 2016
Answered

how can I target a captivate variable from within a web object

  • September 20, 2016
  • 2 replies
  • 750 views

how can I target a captivate variable from within a web object

    This topic has been closed for replies.
    Correct answer TLCMediaDesign

    window.parent.window.cpAPIInterface.getVariableValue("cpQuizInfoStudentID");

    window.parent.window.cpAPIInterface.setVariableValue("yourVariable", ""value");

    window.parent.cp.enable()

    window.parent.cp.disable()

    window.parent.cp.show()

    window.parent.cp.hide()

    2 replies

    TLCMediaDesign
    TLCMediaDesignCorrect answer
    Inspiring
    September 20, 2016

    window.parent.window.cpAPIInterface.getVariableValue("cpQuizInfoStudentID");

    window.parent.window.cpAPIInterface.setVariableValue("yourVariable", ""value");

    window.parent.cp.enable()

    window.parent.cp.disable()

    window.parent.cp.show()

    window.parent.cp.hide()

    Inspiring
    September 20, 2016

    ..or TLC

    Inspiring
    September 20, 2016

    Hi Teresa,

    At first glance I would say you couldn't,  but lets get more information. When you say "target a variable in a web object" do you mean influence the objects in web object, for example if you have a vimeo video and you want it to start or stop or do you mean intact with a web site in the web object?

    Cheers

    Steve

    teresah9791625
    Known Participant
    September 20, 2016

    I have a slide (Slide A) with a web object that displays a simulation (basically another captivate project) inside a web object. Basically I want to disable the next button on Slide A until the user has viewed the entire simulation. So I want to be able to send value back from the web object to Slide A so that I can turn on the next button. The reason for this, is Slide A will actually have 2 buttons for two different simulations. And I don’t want them to continue until both are viewed. I am thinking I could maybe use window.parent.window.cpAPIInterface.setVariableValue(“simulationsDone”); Then I guess I would have to add an event listener to know if variable changed to know when to turn next button on.

    Thanks,

    Teresa

    Inspiring
    September 20, 2016

    Ah..so you want to basically communicate between two projects. I think this is possible, I know InfoSemantics CP Extra widget advertises that it can do this,  but i haven't used that feature yet. I will leave this question for those who are more knowledgeable like Leive or Rod !