Skip to main content
Participating Frequently
October 26, 2018
Question

Problem with cpAPIInterface

  • October 26, 2018
  • 2 replies
  • 403 views

Hi. I am trying to recreate the passing of variables from an iframe as discussed in this thread on this forum. I have copied the code exactly and deployed it on a server with JSON enabled. It doesn't work when it appeared to work for both of them. I get the error that cpAPIInterface is undefined.

Here is the console from Firefox:

Does anyone know what the problem is? Thanks.

    This topic has been closed for replies.

    2 replies

    TLCMediaDesign
    Inspiring
    October 28, 2018

    That doesn't seem like a normal webpage loaded into Captivate. There is Google ad and adclick things there. You are getting an error that you cannot communicate with cross domain scripting. What is the page that is embedded in the iframe, it needs to be on the same domain.

    Participating Frequently
    October 30, 2018

    Thanks. Yes, unfortunately, those other things are coming from the server. Trying it on another server produced the same results. I have tried to have the source of the iframe be both a fully justified URL and a relative URL in exactly the same folder on the server as the published Captivate file because I was worried about cross scripting issue.

    TLCMediaDesign
    Inspiring
    October 30, 2018

    just try using window.parent.window.your_variable_name;

    If it's HTML5 you don't really need the interface object.

    Participating Frequently
    October 26, 2018

    I am using Captivate 2017.