How to read the Captivate in external JavaScript variables

Hello

I want to develop the combination of quiz questions and test me Captivate simulations. And send the results to external JavaScript, so I can save it in the database.

I have published the Captivate to HTML5, typed this code in an external .js file, and linked to index.html, but I get only the alert 'no ICC interface' interface is not detected, according to me. I tested from a local web server. Any ideas?

==============================================================================

var interfaceObj;

var eventEmitterObj;

window.addEventListener ("moduleReadyEvent", function (evt)

{

evt. Data gate through the interface.

This is the same as window.cpAPIInterface

interfaceObj = evt. Data;

eventEmitterObj = interfaceObj.getEventEmitter ();

});

Make sure window.cpAPIInterface is available

If (interfaceObj)

{

Make sure window.cpAPIEventEmitter is available

If (eventEmitterObj)

{

Add a listener for the CPAPI_SLIDEENTER event

eventEmitterObj.addEventListener ("CPAPI_SLIDEENTER", function (e)

{

bogus var = interfaceObj.getVariableValue("slideNumber");

Alert (cAns);

window.cpAPIInterface.setVariableValue ("mySlideVisitCounter", lSlideVisitCtr);

});

}

} else {}

Alert ("No. IPC interface")

}

You're talking about data are not in this case, the window.

eventEmitterObj.addEventListener ("CPAPI_QUESTIONSUBMIT", function ( e ) {}

bogus var = e.Data.correctAnswer;

Alert ("correctAnswer =" + cAns);

Tags: Adobe Captivate

Similar Questions

  • Apex plugins - how to reference the attributes in external javascript plugin?

    Hello

    I created a plugin for item-level.
    It works very well, however I have faced with a new problem - I need to make reference to attributes in the external javascript code of the plugin.

    Here's some of my Javascript:
    function boxesCheck(){
     var itemName = "P" + getAPexVariable("APP_PAGE_ID") + "_DESCRIPTION_ML";  
     var vResult = "";
     
     if(document.wwv_flow.f30.length>0){
       for (var i = 0; i<document.wwv_flow.f30.length; i++) {
           document.wwv_flow.f30.checked=true; 
         
    vResult = vResult + '[' + $.trim(document.wwv_flow.f32[i].value) + '|' + $.trim(document.wwv_flow.f33[i].value) + ']';
         
    }
    }else{
    document.wwv_flow.f30.checked=true;
    vResult = '[' + $.trim(document.wwv_flow.f32.value) + '|' + $.trim(document.wwv_flow.f33.value) + ']';
         
    }
         
    $x(itemName).value = vResult;

    apex.submit();
    }

    function addRow_new(){
    $('#report-standard1').append('<tr class="highlight-row1"><td class="data" headers="CHECK$01"><input type="checkbox" name="f30" value="1" onclick="highlight_row1(this,1)" id="f30_1" /></td><td class="data" headers="LANG"><input type="text" name="f32" size="80" maxlength="100" value="" style="width:85px" size="12" id="f32_1" /></td><td class="data" headers="DESCRIPTION"><input type="text" name="f33" size="80" maxlength="100" value="" style="width:345px" size="46" id="f33_1" /></td></tr>');

    }


    In the above code 2 values has to be substituted by plugin's attributes:
    1st function: var itemName has to receive the plugin's Item Name.
    2nd function: #report-standard1 has to be substituted by plugin attribute.

    How to do it please?
    Thank you!

    Hi Sloger,

    Modify your function to accept two parameters, something like this

    function boxesCheck(pParam1,pParam1){
    //and use them as required within the function
    ...
    .
    .
    

    How you call this function of boxesCheck of your plugin? He must be somewhere in your plugin code.

    Simply pass those two values as parameters

    Thank you

  • How to display the value of a javascript variable in a region of html?

    Hello

    I need to show my title of the page or in a region of html.
    I added a script in the < title > section header of style...:
    (Thanks to Andy: page attributes Get page name? )
    <script type="text/javascript">
    var pageTitle = '#TITLE#';
    </script>
    ... so I can use it in a javascript variable.

    But now I don't know how to view in html syntax...

    Thank you!
    Fanny

    ... so I can use it in a javascript variable.

    See no reason to change the templates to introduce a needless global JS variable when the document property is already there. Display using an appropriate HTML element, for example h1 if it's the overall page header.

  • How can we display - hide or enable - disable the Captivate objects using javascript?

    How can one show - hide or enable - disable or change the color of the Captivate objects using javascript?

    All ideas, actually I want to avoid Advance Action assisted drop programming and want to do the actions of text encoding.

    You can show/hide and activate using the following syntax.

    CP. Show ("obj." + i)

    CP. Hide ("obj." + i)

    CP. Enable ("obj." + i)

    CP. Disable ("obj." + i)

  • How to read the value of the javascript component text entry

    Hello

    I need to add ' / ' after user entering the first two characters and before entering the third character of character to the value of input text.
    To meet this requirement, I add a clientListener of type keyPress to input text element.
    My question is how to read the value entered by the user to input text in java script component (the clientListener method).

    I faked my requirement in a sample application @ http://www.easy-share.com/1912896093/format.7z

    Please help solve this problem.

    Thank you
    Kiran

    For setting/getting the value, you can even view:




    function keyPress (event) {}
    component = event.getSource ();

    Alert (Component.getSubmittedValue ());

    {component.setValue ("new value '");}
    ]]>

    Thank you
    Nini

  • Calling an external javascript variable in captivate

    I need captivate to reference an external JavaScript variable to check if its value is 1 or 0. If the value is '1' I need to display a button, if the '0' button is hidden.

    The reason why I need external is I want the customer to be able to change the value of the variable without having to republish files.

    I know not if I add a JavaScript file and folder to "program Adobe Captivate 9 x64\HTML\assets", it will be always published whenever captivate publishes, the question is how Captivate to refer to the variable in the JavaScript file?

    I use the latest version of Captivate 9.0.2 publish HTML5

    Thank you

    Gary

    Thanks for your suggestions of Peter!

    I managed to make it work last night using a different method.

    First set the variable 'SP_Assess_Included' in Captivate with a default value of 0.

    Then, I went in the folder "C:\Program Files\Adobe\Adobe Captivate 9 x64\HTML" and changed "index.html".

    Then I added the following line in the

  • How to read the files on time capsule

    How to read the files on time capsule from iPad?

    Thank you

    Using an application like navigation on the iPad. More info here:

    Stratospherix - FileBrowser - overview

  • How to read the status of User1 DIP-switch with a cRIO FPGA chassis?

    How to read the State of the DIP switches on a FPGA cRio chassis?

    I work with a cRIO 9022... My idea is to put the system in "service" mode with USER1 switch to IT and communicate with the FPGA via the FPGA - GUI (VI) on the host computer instead via the RT module that is used in normal conditions.

    Any ideas? Unfortunately, I don't have an unused channel on the left... .and (as I know) cannot use the interface RS232 of FPGA.

    Many thanks in advance,

    Luke

    Hi, this is the correct information. You cannot read the FPGA of DIP-switch status. The only thing you could do is to use the function of Reading Switch.vi located under the range of functions-> real-> utilities RT time

    It's how you probably know side host RT and not the FPGA.

    Cordially Virginia

  • How to read the value of list boxes by iteration in a loop For?

    I have a lot of list boxes on the front of my VI. I want to know how to read the value of this combo with a loop boxes For. The point is that I don't know how to get the reference of each combo box in a loop.

    Any information would be welcome. Thank you!

    su27 wrote:

    I have a lot of combo boxes on the front of my VI [...]

    Be sure to close the references that you have finished with them.

  • How to read the VI Analyzer config file?

    Hello

    How to read the analuzer vi configuration file? I'm getting a lot of errors on the size of the front panel and I don't know what should be the size you want. Where is the maximum expected size of the specified front panel?

    Kaspar says:

    Hello

    How to read the analuzer vi configuration file? I'm getting a lot of errors on the size of the front panel and I don't know what should be the size you want. Where is the maximum expected size of the specified front panel?

    If you have VI Analyzer installed, you can load the configuration file and look at the section select the Tests. There is a test for the maximum size of front under front-> User Interface. The default value is the resolution of the current monitor of the PC (including multiple monitors). You can change to the desired option.

  • How to read the date and time of a file by labview information

    How to read the date and time of a file by labview information? for example, time created and updated time.

    The similar question had already spoken here (this is the old thread but still seems topical):

    http://forums.NI.com/T5/LabVIEW/file-date-created/TD-p/109836

  • How to read the host name or serial number cRIO locally

    I have not worked with cRIO and decided to ask for help.  (o).

    I don't know about the screws that allow to access this information from a connected Windows machine, however, I want to retrieve and display this information on remote panels.  But I cannot determine how to read the cRIO hostname or the serial number of the software running on the cRIO?

    Thanks for the help.

    James

    This could help.

  • How to read the two columns of data from the Port series

    Hello

    I'm reading two columns of data from the serial port.

    Example:

    52439 52430

    52440 52437

    52209 52214

    51065 51070

    52206 52390

    I use the serial of Visa service and I can read the first column of data from the serial port, but I can't understand how to read the second column.

    I want to both sets of chart data.

    I enclose my VI.

    Thank you for your help.

    The analysis of string function takes a "Format string" on top (with the right button of the function and choose Help, which explains all the entries).  In particular, you can say 'Give me two numbers separated by a tab' and the output will be two numbers (whole or floating, depending on the chosen format).  In particular, %d\t%d specifies a decimal integer, , whole decimal.

  • How to read the color table in a subvi?

    How to read the color table in a subvi? Is it made by a reference to the table or with a global variable? For a better understanding of the problem, I added to vi. Run the "run.vi." I want to see

    the background color of the table "run.vi" in the subvi called "read color.vi".

    How can I do?

    Thanks in advance

    Norick

    pop up on the wire table refernece and establishes 'control '. Add this control to the icon of the sub - VI decision-making and then wire ref of the appellant to this Terminal VI so the calling VI move the ref to the Subvi.

    Ben

  • How to read the 32-bit depth .bmp image

    How to read the image, 32-bit depth using LabVIEW .bmp?


Maybe you are looking for

  • Alert when adding to playlist duplicate songs?

    I build my playlists over time based on the music I hear - either through my own music or songs that I hear while listening to playlists or radio on music from Apple.  Sometimes I'll see my playlist and find songs that are duplicates of each other. 

  • "hardware error" message on BACK on NB200 when using wireless

    Hello I have a toshiba nb200 laptop running xp.The WiFi card is an atheros ar9285. I have a question where the Wi - Fi connection drops and I see "hardware error" in the BACK trying to make a ping to an external Web site. "I can ping my gateway when

  • HP Pavilion dv8000

    I need to replace the keyboard on my laptop.  Looked at the parts list but do not know what the difference between a dv800av and dv800avr is?  Anyone can help or tell me what keyoard I need to order? Thank you!

  • Cannot make connection IP cRIO more

    Short version: connection of Ethernet to my cRIO but suddenly become unstable, and I can't connect at all now. I'm working on the cRIO code for a client and try to work remotely. We had problems getting the deployed code to run (see http://forums.ni.

  • With the selection of a value logic!

    Hello I am faced with a simple logic problem! I have to choose a letter A, B, C, D, E, F & G. What I want is a display on the front panel (figure logic)... and when I click on any button... it sends the letter corresponding to the transformation. The