Posting variables from Captivate 5

Dear gurus,
I would like to be able to post quiz and user variable data from Captivate 5.  I notice that the Cap. 5 has Javascript functionality but is there any way of referencing a lesson's variable data so that it can be posted out of Captivate? 
My goal is to post data to a server script which will then route the data to a database.  I realise there is the new alternate results feature but I can't use php in my workplace.  I also can't use an LMS for the recording of data.
Any help would be greatly appreciated.
Best wishes,
Mister Gee

So I keep working with it, trying to get the data from the POST. I've tried using a very rudimentary method of checking to see if I'm able to get the variables, but for some reason, I'm not able to.  Here's a snippet of what I'm doing just to see if I'm getting the values. Once I'm able to write the values to the text file, I'll be able to move forward.
<%
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
dataString = request.form("dataString")
CompanyName = request.form("CompanyName")
DepartmentName = request.form("DepartmentName")
CourseName = request.Form("CourseName")
Filename = request.Form("Filename")
Filedata = request.Form("Filedata")
If NOT fs.FolderExists("D:\Hac_userdata\QWDweb\elearning\CaptivateResults\") then
  fs.CreateFolder("D:\Hac_userdata\QWDweb\elearning\CaptivateResults\")
Else
End If
set f=fs.OpenTextFile("D:\Hac_userdata\QWDweb\elearning\CaptivateResults\test.txt", 8, true)
f.WriteLine("( " & DepartmentName & " )" & " " & now())
f.close
set f=nothing
Set fs=Nothing
%>

Similar Messages

  • Passing a variable from Captivate 5 to Flash CS5/ActionScript 3

    I don't get it. Why is it so difficult to pass a variable from Captivate 5 to AS3/Flash CS5. I must be making it harder than it really is. I cannot figure it out.  Can anyone help?
    I have a variable (gpDone = 1) defined in Captivate 5 (it's a guided practice) on the last frame which will indicate that the learner has completed the guided practice file.
    Now I want to pass that variable back to Flash/AS3 so I can evaluate whether I should show the Continue button so they can continue. They have to complete the guided practice before they can continue. If it is equal to 1, the Continue button will display. If it is not equal to 1, the Continue button will not display, but a message will display telling them they have to complete the guided practice in order to continue in the course.
    Do I need to edit the Flash html? Or just put code in the Flash timeline or the associated AS file?
    Help would be greatly appreciated. Thanks in advance.
    CAH

    Having the same problem...getting variable values FROM captivate to my inserted .swf (not widgets).
    I can set the value from the .swf to the captivate using Object(parent.parent.parent.parent).captivateVariable but not the other way around.
    Very frustrating.
    I hope someone answers your query.

  • Passing variables from Captivate to HTML

    Hi All:
    I am trying to figure out how to export system and user variables from Captivate to the html wrapper. What I need to accomplish here is very simple. I want to capture a quizz score and pass that number back to the html file. Can anyone out there help me with this?
    I have been adding the following javascript code to my html file after publishing for testing:
         <script type="text/javascript">
         function SimpleTest()
                alert('I can call javascript');
         function ComplexTest(grade)
                alert('The grade you passed was: ' + grade);
         function ComplexAlternateTest()
                alert('The grade you passed was: ' + GradeVar);
         </script>
    I have successfully tested the first function SimpleTest() so I know that Captivate can communicate with the html file. However, I have not been able to successfully pass any system or user variables to either of the other two test functions. I suspect that I am not getting the syntax correct in the javascript call in Captivate.
    My approach has been to use execute javascript in the on slide exit. I have also tried creating an advanced action that stores a system variable to a user defined variable and then tried sending the user define variable with no success. In the javascript popup window I have been putting ComplexTest(variablename); . I don't know if this is the correct syntax or not??  I have tried using the cpQuizInfoPointsscored system varialbe with and without the $$ signs and I have tried using {score} on the quiz results page. So far no luck. I always get a "variable not defined" error message.
    Sorry for the lengthy message but you would think that something this simple would be more straight forward, but apparently it is not. Thanks in advance for your help.
    Vernon . . .

    Hi Vernon,
    I'm not a JavaScript ninja so I can't answer your question. However take a look at Philips site here http://pipwerks.com/
    He has a lot of interesting stuff in regards to Captivate and JavaScript integration so hopefully you can find the answer on his site.
    /Michael
    Visit my Captivate blog with tips & tricks, tutorials and Widgets.

  • Retrieving variables from Captivate 4 in Flash (AS2)

    I've found a couple threads in this forum on this topic, but none of the code suggested in these threads seems to work.  I have a quiz created in Captivate 4.  The 'Results' slide changes a user-defined variable, varCAPChp1Test to 1 on enter of the slide (I use the 'Assign' command from the dropdown in slide properties to assign this variable a value of 1).  I want to reference this variable in my .fla file using AS2.  I load the Captivate swf into an empty movieclip using the following code:
    var myMCL = new MovieClipLoader();
    myMCL.loadClip("supporting_SWFs/Quizzes/Chp1_Quiz.swf", "mc_EmptySWF"); //the swf loads and functions just fine
    checkCompletion = function():Void
        var test = mc_EmptySWF.varCAPChp1Test;
        if(test != null && test == 1)
            trace("Chapter 1 Test completed!");
        else
            trace("?");
    addEventListener(Event.ENTER_FRAME, checkCompletion);
    //Here is the output when I publish the .fla:
    Branching::script:varTotalPts = varTotalPts + 10
    rdcmndResume = 1;
    deepak branching : scripteval:[object Object];
    Branching::script:rdcmndResume = 1;
    deepak branching : scripteval:[object Object];
    Branching::script:varTotalPts = varTotalPts + 10
    rdcmndResume = 1;
    deepak branching : scripteval:[object Object];
    Branching::script:rdcmndResume = 1;
    deepak branching : scripteval:[object Object];
    Branching::script:varTotalPts = varTotalPts + 10
    rdcmndResume = 1;
    deepak branching : scripteval:[object Object];
    Branching::script:varUserPts = varUserPts + 10
    rdcmndResume = 1;
    deepak branching : scripteval:[object Object];
    Branching::script:varTotalPts = varTotalPts + 10
    rdcmndResume = 1;
    deepak branching : scripteval:[object Object];
    Branching::script:varUserPts = varUserPts + 10
    rdcmndResume = 1;
    deepak branching : scripteval:[object Object];
    Branching::script:varTotalPts = varTotalPts + 10
    rdcmndResume = 1;
    deepak branching : scripteval:[object Object];
    Branching::script:varCAPChp1Test = 1 //so the value is assigned properly in Captivate, but Flash doesn't "listen" for it.
    rdcmndResume = 1;
    deepak branching : scripteval:[object Object];

    I've changed the code below to just trace the value of a variable in Captivate when it's completely loaded in Flash and I keep getting 'undefined.'  I'm also using a system variable instead of a custom user variable this time.
    var myMCL = new MovieClipLoader();
    myMCL.loadClip("Chp1_Quiz.swf", "mc_contentHolder");
    myMCL.onLoadComplete = function(target_mc:MovieClip)
        var test = mc_contentHolder.rdinfoSlideCount;
        trace(test)
    //Here's the output I receive:
    undefined
    Branching::script:varChp1Test = inprogress
    varTotalPts = varTotalPts + 10
    rdcmndResume = 1;
    deepak branching : scripteval:[object Object];
    I know that myMCL.onLoadComplete is working b/c I am receiving the trace output, but Flash is not reading the variable from Captivate.  Can anyone help me see what I'm doing wrong?  I've been doing research on this for several days with no success.  This should be pretty simple and I keep getting 'undefined.'
    Thanks.

  • Forwarding A Servlet Post Variables

    Hello, I'm trying to forward some posted variables from form A to this servlet where I am adding one more then forwarding it on. How can I get it to forward and show up in the URL window instead of how I'm doing it here with the servlet context?
    package com.shoponlinesecure.order;
       import java.io.*;
       import javax.servlet.*;
       import javax.servlet.http.*;
       import java.util.*;
       public class AddHashAndForward extends HttpServlet {
          public void doPost(HttpServletRequest request,
          HttpServletResponse response)throws ServletException, IOException {
             response.setContentType("text/html");
             PrintWriter out = response.getWriter();
             HttpSession session = request.getSession(true);
            out.write(AuthorizeNetFingerPrint.insertFP("wil481306225","AMONaKPAIXGdLUgB","10.50",
            "789", null));
            out.close();
            RequestDispatcher dispatcher =
            getServletContext().getRequestDispatcher("https://secure.authorize.net/gateway/transact.dll");
            dispatcher.forward(request, response);
          }-thanks

    This is basically what I'm trying to do in java without any javascript. They have this thing as you can see called a <%ret variable%> that only gets executed when you hit the submit button. I'm trying to do it the way I am becuase I do not want to use javascript to simulate the asp ret variable. So I thought I forwarded it to a servlet that added it then forwarded it to the gateway I would be ok?
    Example 1 � Minimum requirements for requesting a Payment Form
    The following HTML code along with the server-side script represents the minimum data that would need to be inserted into a page to provide a connection to the system. It shows that the fingerprint, time stamp, and the sequence number are inserted into the HTML form POST along with Login ID and other required fields. The result of this HTML code snippet is a button. Clicking on the button will take the user to the gateway�s Payment Form.
    A call to generate the fingerprint should be made when the button is clicked and before the Payment Form request is made to the gateway. A sequence number should be generated and the total amount of the tranaction calculated before the call to generate the fingerprint is made. The function used to generate the fingerprint takes these fields (amount, transaction key, Login ID, and sequence number) The transaction amount should not change after the fingerprint is generated. All trailing spaces need to be removed from the fields used to generate the fingerprint
    <!--#INCLUDE FILE="simlib.asp"-->
    <FORM METHOD=POST ACTION="https://secure.authorize.net/gateway/transact.dll">
    <% ret = InsertFP (loginid, txnkey, amount, sequence) %>
    <INPUT TYPE=HIDDEN NAME="x_login" VALUE="your login ID goes here">
    <INPUT TYPE=HIDDEN NAME="x_show_form" VALUE="PAYMENT_FORM">
    <INPUT TYPE=HIDDEN NAME="x_amount" VALUE="amount goes here">
    <INPUT TYPE=SUBMIT VALUE="Click here for secure payment form">
    </FORM>
    The function InsertFP is provided by the gateway and can be downloaded from the Merchant Interface. This function must be called within a server-side script on the merchant Web server. The above example shows the call being made in an ASP scripting environment.

  • Post variables not via URL

    Hello to all,
    I build a site based on the JSP - servlet technology . My problem is that I want to post variables from JSP to servlet and vise vera without reveal their value to the end user through the URL. I am using the setAttribute parameter but by this way even user's password is visible in the url. I 've heard that there is an invisible way posting variables, but I don't know how. Does anybody know how this can be done?
    Tnx in advance

    You use <form method="post">
    This prevents the request parameters from being shown in the URL.
    request.setAttribute() will not affect the URL at all - it is the preferred way to pass values between jsps and servlets when using the requestDispatcher at the servlet end.
    Cheers,
    evnafets

  • What is the best practice to set Captivate variables from Get (less ideal) and Post (more ideal)?

    We are trying to set a couple of variables in Captivate 7 by posting the information from a URL. Is there a best practice for doing this, or does it require a custom JS or other call in order to do this?
    Essentially, we want to pass three variables from a URl to named variables in a Captivate 7 swf so that the information can be drawn from a database, and does not need to be entered by the user.
    Suggestions, thoughts, pointers to where we may be able to find this information - all would be greatly appreciated!

    Not sure how Captivate treats FlashVars internally, but the native html template includes a script to read URL parameters:
    var strURLFull = window.document.location.toString();
    var intTemp = strURLFull.indexOf("?");
    var strURLParams = "";
    then:
    if(strURLParams != "")
       so.addVariable("flashvars",strURLParams);
    It also has a script to add variables but you'd have to parse the variables first first to use it:
    so.addVariable("variable1", "value1");

  • Passing variables from web server to HTML5 Captivate File

    I am publishing a Captivate quiz as HTML5 and hosting them on a website. I would like to know how I can pass data from my site to the HTML5 based Captivate quiz.
    So far I have had success getting data out of captivate by having the file POST the results of a finished quiz to a RESTful route. However, I have not had success putting data into the file. I would like to pass information such as User ids and quiz ids, maybe even current slide position so that I can associate the quiz information with my database. I am not specifically looking for a solution to user ids, quiz ids, etc. because I can get creative in that regard, I just want to know if others have been able to set variables on Captivate file load.
    I have tried a setting variables in a couple ways:
    - Declaring the variables with javascript, then ajax loading the page into a div. This caused dependency issues since the captivate file uses relative paths for its assets folder.
    - Modifying the published html file by adding the javascript variables, this returned an error message saying I cannot override the existing captivate variables
    - Adding the js variables into the init function, this had no effect.

    To simply pass the username and an id I used the following.
    Note the URL has query string parameters that match the captivate variables
    http://mywebsite/Course/index.html?cpQuizInfoStudentID=IDHere&cpQuizInfoStudentName=Studen tNameHere
    Another way to do this to use JavaScript to read the query string, and the assign variable in CP to the query string values. I remember reading some more detail, but cant remember where.
    Hope it helps
    Luke

  • Can we send pre-test score (Pre-test question slide) and post test score (Question slide) both in lms from captivate?

    can we send pre-test score (Pre-test question slide) and post test score (Question slide) both in lms from captivate?

    Pretest score normally is not sent to the LMS. However it is stored in a system variable, you could use JS to send it.

  • Is there any way at all of accessing captivate variables from flash?

    Hi,
    I would be grateful for any help on this one.  I have been working in flash and I wanted to know whether there is any way at all of calling/accessing captivate 4 variables from flash (I'm working in flash Cs4 Actionscript 3.0 and I'm trialling Captivate 4, but I just want to know whether there is any way/method of communicating between a flash file and a captivate 4 file, and if so, can this be done with an embedded captivate 4 file/swf).  Surely there must be a way of communicating between the two - they are both Adobe products!
    Thanks for any help, pointers, advice, tips in advance.

    Hi Louon,
    Don't know if this would help you.
    http://blogs.adobe.com/captivate/2009/09/captivate_variables_-_how_to_a.html
    We have many experts here who could give more precise answers.
    Cheers.
    Miguel

  • Accessing Captivate 5.5 variables from embedded SWFs

    Hi,
    as we all know the interface for accessing Captivate variables from embedded SWFs tends to change between Captivate versions. Shortly after it's release we upgraded to version 5.5, and I'm not succeeding in accessing the Captivate variables in my Flash/AS3 code the same way it was done in version 5.
    How should I access the Captivate 5.5 variables (rdinfoCurrentSlide et al) from my SWFs?

    Hi,
    You can use system variable : cpInfoCurrentSlide to show the slide number.
    So you can use text captions to display the value of the variable, the format for displaying the value stored in the variable is $$<system variable>$$. So for slide number use : $$cpInfoCurrentSlide$$, type this in the text caption and then check it in the preview.
    Thanks

  • Variables from Adobe Captivate to flash

    Hi,
    can anybody explain me, how to acces variables in captivate
    from flash?
    I can't export my CP file to Flash CS3, there is an alert
    message
    The following elements in your project have not been
    converted. They are not supported by this importer.
    Question slide
    508 compliance
    A swf animation slide has been imported. The following files
    must be made available at publish time:
    DefaultPreloader.swf
    Please make sure you publish the project to "D:\MyQuizzes\".
    Saving the project to this directory will ensure that test
    project will work with the swf animation slide.
    Thanks for answer...

    Hi tikiri,
    You can access variables directly using the movie instance.
    Please check the code below, where we are printing the varCount
    variable.
    on(release){
    _root.play();
    _root.createEmptyMovieClip("movie", 999);
    _root.movie._x=146;
    _root.movie._y=12;
    loadMovie("test/test.swf", _root.movie);
    trace (_root.movie.varCount);
    This code is specific for AS2 captivate swfs. You can try
    accessing any of captivate system variables also in this way:
    _root.movie.rdcmndNextSlide = 1; // jumps to next slide
    _root.movie.cpCmndMute = 1; // mute the audio
    trace(_root.movie.cpInfoCurrentDate); // print the current
    date
    _root.movie.rdInfoCurrentSlide =
    _root.movie.cpInfoLastVisitedSlide // jumps to last visited slide
    Please go through the list of available variables in
    captivate documentation. All the variables starting from "rdcmnd"
    are legacy variables and exist in captivate 3 projects as well.
    Ones starting with "cp" are new and are not available prior to
    captivate 4. Accessing method remains the same for both cp3 and cp4
    generated swfs.
    For accessing variables in AS3 captivate movies:-
    var movieLdr:Loader = new Loader();
    var movieURL:String = "CA3_Demo.swf"
    var movieURLReq:URLRequest = new URLRequest(movieURL);
    var cpMovie;
    movieLdr.addEventListener(Event.COMPLETE,loadComplete);
    function loadComplete(ae:Event)
    cpMovie = movieLdr.content;
    //Pause the movie
    cpMovie.rdcmndPause = 1;
    //Resume the movie
    cpMovie.rdcmndResume = 1;
    //Jump to next slide
    cpMovie.rdcmndNextSlide = 1;
    also try,
    // print current date
    trace(cpMovie.movie.cpInfoCurrentDate);
    addChild(movieLdr);
    movieLdr.load(movieURLReq);

  • How do I access Captivate 6 variables from a playbar?

    I need to access Captivate 6 variables from a playbar. Does anybody know how? I know the parent/child relationship has changed from previous versions.

    Dear Herod,
    Thanks for the request, To program a FPGA target you must have the module
    Labview FPGA. So you cannot directly access the FPGA with LabWindows/CVI.
    But there is a way. Firstly create with Labview a Host VI that communicate with
    the FPGA target and compile this VI into a dll and then call it from CVI program.
    See the following link:
    Can I Use a Programming Language
    Other Than LabVIEW with a Reconfigurable I/O Board?
    LabWindows/CVI support for PXI 7831 R
    Best regards,
    Nick_CH

  • Passing a variable from SQL*Plus to Korn

    Sorry if this isn't the correct forum, not sure where to post this otherwise. And excuse the poor shell script programming - I have no excuse.
    I have a shell script that generates another shell script to delete database related files. I have no problems getting the filenames for the datafiles or the control files or the redo logs (just for info its to clone and rename a prod database and we don't have RMAN in place yet).
    I do have a problem with the spfile. I'm using this :
    V_SPFILE=`sqlplus -s "/ as sysdba" << EOF
    set feedback off;
    set pagesize 0;
    select value
    from v\\\$parameter
    where name like 'spfile%';
    exit;
    EOF`
    which passes "?/dbs/[email protected]" to V_SPFILE. Then later on in my script I'd like to do something like :
    mv $V_SPILE OLD${V_SPFILE}${TDATE}
    TDATE is todays date BTW.
    Trouble is, the "?" is passed to the shell script. I know that I could put something like :
    $V_SPFILE = $ORACLE_HOME/dbs/spfile${SID}.ora
    as a global variable, but I want to be sure that the spfile that is in use is renamed.
    So, how does one deal with the "?" passed to the shell script?

    Having the same problem...getting variable values FROM captivate to my inserted .swf (not widgets).
    I can set the value from the .swf to the captivate using Object(parent.parent.parent.parent).captivateVariable but not the other way around.
    Very frustrating.
    I hope someone answers your query.

  • LoadVars-using send to pass a variable from flash to php

    For the life of me, I've tried everything:
    I've researched LoadVars on Adobe forum, used David Powers'
    books, googled 'flash to php', LoadVars, etc. and tried
    sendAndLoad, send, and using $_POST, $_GET, $_REQUEST.
    $HTTP_POSTVARS but I keep getting this same error. any advice
    please?
    I have a Unix server running Apache/PHP 4 - LoadVars worked
    to load name-value pairs into an array -see thread)
    My goal with this simple app is to prototype being able to
    pass a variable from flash to a variable in php.
    Parse error: syntax error, unexpected T_VARIABLE in
    flash_to_SQL.php on line 5
    Actionscript 2.0 code:
    var c :LoadVars = new LoadVars();
    c.testing = "123FOUR";
    c.send ("
    http://127.0.0.1/flash_to_SQL.php","_self","POST");
    php code: (I also tried $_POST, $_GET, $_REQUEST.
    $HTTP_POSTVARS)
    <?php
    //mysql 4.1.2, php 4 , NO mysqli
    ecbo $_REQUEST ['testing'];
    /?>

    var formData:LoadVars = new LoadVars();
    formData.fname = "Name";
    formData.send("
    http://www.website.com/flash_php.php",
    formData, "POST");
    <?php
    $name = $_POST['fname'];
    echo $name;
    ?>

Maybe you are looking for