Skip to main content
Andreys75
Participant
May 19, 2014
Question

How to send results from Captivate 7 to PHP?

  • May 19, 2014
  • 1 reply
  • 368 views

Hello!

I need to send quiz results to PHP server.  In Captivate 5 i did it with settings reporting by e-mail, than parcer data and send results to PHP server.

In Captivate 7 this settings unevalible.

How to do it now?

I have tryed some cases:

1. Use settings Internal Server  - but it show  dialog box where user have to put his name and e-mail. I dony need it!  My script knows who try to pass quiz.

2. I try to use this code :

<script type="text/javascript">
document.getElementById('Captivate').focus();
document.Captivate.focus();

function getData(){

var cp = document.Captivate;
cp.cpEIGetValue("m_VarHandle");

}

</script>

<a onclick="getData();" href="#" > get data</a>

But it generate erorr Uncaught TypeError: undefined is not a function

on line cp.cpEIGetValue("m_VarHandle");

What can i do ?

    This topic has been closed for replies.

    1 reply

    TLCMediaDesign
    Inspiring
    May 19, 2014

    You are not getting the value of a variable, but an object, Change it to the following where yourVariableName is the variable name you are retrieving:

    cp.cpEIGetValue('m_VarHandle.yourVariableName');

    Andreys75
    Andreys75Author
    Participant
    May 19, 2014

    var cp = document.Captivate;

      alert (cp);

                alert(document.Captivate.cpEIGetValue("m_VarHandle.cpQuizInfoTotalCorrectAnswers"));

    first alert work ok

    second gives the same error  Uncaught TypeError: undefined is not a function ((

    Andreys75
    Andreys75Author
    Participant
    May 19, 2014

    var cp = document.Captivate;

      alert (cp);

                alert(cp.cpEIGetValue("m_VarHandle.cpQuizInfoTotalCorrectAnswers"));

    this is not work too with the same error