Captivate 7 - Captivate Javascript commands do not run.

The joint command of javascript

Alert ("message")

works very well.

Captivate specific orders not and stop any subsequent javascript execution.

Alert ("Message1");

var myStr = window.cpAPIInterface.getVariableValue ("myVariable");

myStr = myStr.toUpperCase ();

window.cpAPIInterface.setVariableValue ("$myvariable", myStr);

Alert ("message2");

The first alert runs, the second alert is not, and the Captivate variable not is changed to uppercase.

More than the standard.js file required for orders of Captivate needs to operate?

The common Interface of JS is not available in CP7.

You need to execute different code for HTML5 and swf.

SWF, you need to get the Captivate object:

cpObj var = document.getElementById ('Captivate')

Then use the external Interface:

cpObj.cpEIGetValue ('m_VarHandle ' + yourVariable)

HTML5 is:

cp.vm.getVariableValue (yourVariable)

Tags: Adobe Captivate

Similar Questions

  • JavaScript in Captivate 9 project does not run

    I tried for hours to get little JavaScript inside an Adobe Captivate 9 (published in SWF and HTML5), deployed to a web server public project, to run. For help troubleshooting, I wrapped in various stages of the script with console.log ("status"); and even those who are not running.

    A demonstration project file is located here: https://dl.dropboxusercontent.com/u/6787201/Test%20Interaction%20Data%20HTML5/Test-Interac tion - Data .cptx

    If you look at the JavaScript window, you will notice there is a function call to sendInteractionData();

    This is a custom function to trigger the data in various Captivate variables in a Google spreadsheet, I wrote. It is contained in the index.html page I change after publication. I tested this feature and it works when the values are explicitly defined and sendInteractionData() is called from a static web site... but when it is embedded in the code JavaScript of Captivate, no luck.

    If you are interested, here is the code I have insert to support the sendInteractionData() function:

    Configuration section

    Paste the URL of the WEB service (obtained after you run the command POST > DEPLOY AS WEB APP) in the variable below!

    var WebServiceURL = "mywebserviceurl";

    Do not edit below this line, unless you intend to change the inner workings of the script

    Declaring variables

    var FirstName;

    var name;

    var Email;

    var attribute;

    Function to send data to interaction in the Google spreadsheet. This function must be called by the Captivate player after setting the variables above.

    function sendInteractionData() {}

    Get and set the relevant data from the Captivate player

    FirstName = window.cpAPIInterface.getVariableValue('cpFirstName');

    LastName = window.cpAPIInterface.getVariableValue('cpLastName');

    Email = window.cpAPIInterface.getVariableValue ('cpEmail');

    Attribute = window.cpAPIInterface.getVariableValue ('cpAttribute');

    Send the data to the Google map via AJAX call

    request = $.ajax({)

    URL: WebServiceURL,

    type: 'post',

    data: "FirstName =" + FirstName + "& LastName =" + LastName + "& Email = ' + Email + ' & attribute ="+ attribute.

    });

    Reminder Manager who will be called to success

    Request.Done (function (response, textStatus, jqXHR) {}

    Save a message to the console

    Console.log ("wrote interaction data sheet: FirstName =" + FirstName + "& LastName =" + LastName + "& Email =" + Email + "& attribute =" + attribute + "/ / Message: success!");

    });

    Reminder Manager who will be called if an error occurs

    Request.Fail (function (jqXHR, textStatus, errorThrown) {}

    Logs the error in the console

    Console.Error)

    "Interaction data could not be saved: FirstName =" + FirstName + "& LastName =" + LastName + "& Email = ' + Email + ' & attribute = ' + attribute + ' / / The following error occurred: ' +"

    textStatus, errorThrown

    );

    });

    }

    PS - declaration of a Google spreadsheet should really be standard features now...

    Thanks for your help.

    You really use the listener attached to the window module ready event to ensure that the API is present.

    var interfaceObj, eventEmitterObj;

    window.addEventListener ("moduleReadyEvent", function (e)
    {
    interfaceObj = e.Data;
    eventEmitterObj = interfaceObj.getEventEmitter ();
    initializeEventListeners();
    });

    function initializeEventListeners()

    {

    If (interfaceObj)

    {

    If (eventEmitterObj)

    {

    window.cpAPIEventEmitter.addEventListener ("CPAPI_VARIABLEVALUECHANGED", function)

    {

    sendInteractionData(); }, 'cpAttribute '.

    );

    }

    }

    }

  • JavaScript command works not in the address bar

    Until FF Version 6.0.2 is supported by the following command via the address bar "javascript:window.resizeTo (1280,1024); In the 7.0.1 version and beta version 8 - it is no longer supported. I use it all day in my role as project manager for testing web pages in different screen resolutions, and I had to downgrade to 6.0.2 just for this feature.

    Support for this was removed permanently or is there a way to enable it in v7 or v8?

    Thank you.

    6 javascript in the url bar from Firefox works with a principal null for security reasons. In other words, that it is almost off. You need a bookmarklet or an add-on for a workaround. See question 871828.

    Bug 656433 - do not allow javascript: data: URLS entered in the address bar to inherit from the principal of the currently loaded page



    From the window of Firefox 7 moving and resizing is no longer allowed with some exceptions. See question 880032.

    Bug 565541 - Web sites should not be allowed to resize the main window

  • Shell CMD commands do not run

    well this very annoying or maybe I am stupid and do something wrong, but... every time I goto "Start" then "run", type "cmd" to open the window of cmd and then try to type of destinations it does not work... For clarity, the text of the cmd window will have brackets on the left side of the line

    For example... This is what it looks like when the window opens:

    [Microsoft Windows XP [Version 5.1.2600]
    [Copyright (C) 1985-2001 Microsoft Corp.
    [
    [C:\Documents and Settings\Matt >]

    then leaves said: I want to go to the root C: / drive so I type in "C:\". ', it will give me the following message is displayed.

    [« C:\ ' is not recognized as an internal or external, order
    [operable program or batch file.]

    It keeps giving me this message whenever I type in whatever the destination I want to goto or record or other thing

    Any suggestions?

    Use the cd command to change directories on the current disc.  By default, the change is relative to the current directory:

    CD...                          (one level up)
    CD 'my documents' (the subfolder named My Documents )

    Add the /d option to perform absolute change:

    CD /d c:\                    (at the root of drive C :)

    You can put another disk by typing just the drive letter:

    d: (change of drive d :))

    Boulder computer Maven
    Most Microsoft Valuable Professional

  • Great Javascript movies have not run smoothly since Firefox Version 17.

    I asked this question in April, but has won just one useless answer. Nothing has changed since then, while the newer versions of Firefox have been released.

    Please click on Javascript (250.00 MB) on the http://aia.lmsal.com/aia_cadence/aia_0193_rdiff_orig_20120623_0630/AIA_0193_RDIFF_ORIG_20120623_0630.htmlpage. It works without problem in Google Chrome or Microsoft Internet Explorer, but using latest Firefox version 15, partially empty frames appear, making it difficult to see the film.

    I first thought the problem was combined with Mac OS (mine is 10.6.8), but the same problem of empty frames is noted in 22 of Firefox on Windows 7.

    Therefore, I must conclude that Firefox has started to screw up on Javascript since version 17 (or 16, which could not be released).

    Thus, developers, please check what changes have been made in version 17 (or 16) on how to manage Javascript movies.

    You can create a bug report to see if there is a possible solution since it is apparently a regression.

  • EEM CLI commands do not run

    I'm new to scripting, SLA and EEM and went through the forums and documentation for a couple of days now to learn what I can.  I can't get my applet event handler to trigger a reason any.  I get the following syslog message based on my reaction als ip config:

    4 August 21:25:13.915: % RTT-3-IPSLATHRESHOLD: IP SLAs (100): threshold has occurred for timeout

    My setup is less than

    !

    !

    ALS IP 100

    2.2.2.2 - echo ICMP-source 1.1.1.1 ip address

    threshold of 1000

    timeout of 1000

    frequency 1

    calendar of sla IP 100 now start life forever

    reaction-configuration IP SLA 100 respond timeout threshold type 2 5 - type of action trapOnly xofy

    !
    !

    Event Manager applet ipsla-ploss

    PROACTIVE WAN PACKET LOSS SCRIPT description

    event ipsla operation id 100 reaction type timeout

    command action 1.0 cli 'enable '.

    Action 1.1, "conf t" cli command

    Action 1.2 cli command "ip access-list standard bgp-itineraries-in."

    action 1.3 cli command "5 deny 5.5.5.5".

    action 1.4 cli command "6 deny 6.6.6.6".

    Action 1.5 cli command "end".

    !

    !

    Any help is greatly appreciated!

    Add the following to your config:

    logging of IP sla

    activate the IP sla response alerts

  • the command "hp printer assistant" in the software officejet 7500 is not running.

    When I try to run the Officejet 7500 software, the "HP printer Assistant" command does not run when I click or double-click it.  The other 3 commands run normally. This has happened the first or second time I tried to use the software to check ink levels.  I tried ninstalling and reinstall the software without success.

    The system is Pavilion g6-1A30US laptop, Windows 7 Home Premium.

    Hello

    Uninstall the software by clicking Start > programs > HP > HP Officejet 7500 > Uninstall.

    Download and install the latest version of the software below:

    http://h10025.www1.HP.com/ewfrf/wc/softwareDownloadIndex?softwareitem=MP-109374-2&cc=us&DLC=en&LC=en&OS=4062&product=4083652&sw_lang=

    I think you should see options like scanning and fax options now.

    Shlomi

  • JavaScript:if loop does not run...

    IM new to javascript.


    < script type = "text/javascript" >
    function getEmployeeInfo (filter)
    {
    var xml = null;
    get var = new htmldb_Get (null, $v ('pFlowId'), 'APPLICATION_PROCESS is GET_EMPLOYEE_INFO', 0);
    Get.Add ('P2_EMPNO', filter.value);
    RET = get.get ('XML'); - here ret value is "null", I used "alert();" to base the value of 'ret '.
    If (ret) - do not run (im confused with if condition which is 'if (ret)' lie here?)
    {
    var enameItems = ret.getElementsByTagName ("ENAME");
    If (enameItems)
    {
    ename var = document.getElementById ("P2_ENAME");
    var enamedisplay = document.getElementById ("P2_ENAME_DISPLAY");
    Ename.Value = enameItems [0] .getAttribute ("VALUE");
    enamedisplay.innerHTML = enameItems [0] .getAttribute ("VALUE");
    }
    var jobItems = ret.getElementsByTagName ("JOB");

    If (jobItems)
    {
    use var = document.getElementById ("P2_JOB");
    var jobdisplay = document.getElementById ("P2_JOB_DISPLAY");
    Job.Value = jobItems [0] .getAttribute ("VALUE");
    jobdisplay.innerHTML = jobItems [0] .getAttribute ("VALUE");
    }
    }
    get = null;
    }
    < /script >

    RET = get.get ('XML'); - here ret value is "null", I used "alert();" to base the value of 'ret '.

    If it always returns NULL, then you have a problem with the ondemand process: GET_EMPLOYEE_INFO, or that you have not set the session state from any page element used in the process.

    If (ret) - do not run (im confused with if condition which is 'if (ret)' lie here?)

    I guess that the intention here is to make the treatment (element assign the result XML ajax) JS only when the HTTP request returns a non-zero

    Its not not run because it is null as you mentioned in your question.

    You can start debugging by ensuring that the ondemand process returns a non-null;
    Try using ht.p (variable) and check if the values are properly available in the ondemand process (remove them after that you should be to return a XML, it would not interfere with its structure), once the data structure and the result is what you want, the rest of the JS that set the debug settings.

  • Why is there no warning that firefox 4 does not run on a powermac? where can I find firefox 3.6 to reinstall?

    Then I answered a command prompt (by running Firefox 3.6 on my powermac) to download and install Firefox 4. Great! Well, install and replace 3.6 went well, but trying to open Firefox 4 there is a message saying that the material he has not supported. OK fine. But now I don't have firefox. Where can I find 3.6.16 to install?

    The beta of Firefox 4 a few months ago DID run, so it's curious.

    Thank you

    Don

    Firefox 4 requires at least OS X 10.5 and an Intel Mac.

    For Mac OS X 10.4.11 or Mac OS X 10.5.8, you can watch:

    Firefox 3.6.x can be found here:

  • HP Pavilion Notebook PC g7 - The Audio Service is not running

    I don't have sound on my PC for a few weeks, but when I use a headset it is solid. Today, I saw a message saying that the Audio Service is not running. What is going on?

    HP Pavilion Notebook PC g7

    #ABA product number A6Z29UA

    Hello

    Try the following.

    Download IDT Audio Installer on the link below and save it in your downloads folder.

    http://ftp.HP.com/pub/SoftPaq/sp55001-55500/sp55026.exe

    One time finished, open windows control panel, open Device Manager and open sound, video and game controllers.  Right click on the IDT device and select uninstall - also, you should get a command prompt to delete the current driver, check the box allow this and then proceed to uninstall.

    When you are finished, download and reinstall the Chipset driver at the following link.

    Chipset Driver - Windows 7.

    Once this done, shut down the laptop, unplug the AC adapter and then remove the battery.  Press and hold the Power button for 30 seconds.  Reinsert the battery and plug in the AC adapter.

    Robinet tap away at the key esc that you start the computer to launch the Start Menu, and then select f10 to open the bios menu.  Press f5 to load the default values (sometimes it's f9, but the menu below indicates the correct key), use the arrow keys to select 'Yes' and press ENTER.  Press f10 to save the setting and still use the arrow keys to select 'Yes' and press on enter.

    Allow Windows to fully - charge it will automatically load an audio driver, but let just this complete.  Then open your download folder, right-click on the IDT Installer and select "Run as Administrator" to launch the installation.  Once this done, do a right-click the speaker icon in the taskbar and select playback devices.  'Speakers and headphones' left click once to highlight, and then click the Set Default button - check if you now audio.

    Kind regards

    DP - K

  • Firewall is corrupt? Does not connect to the internet. Get the message "the firewall settings window cannot be displayed because the associated service is not running".

    Original title: wall of fire is corrupt? Does not connect to internet

    The "firewall settings window cannot be displayed because the associated service is not running" message, but then it won't access the internet or run the program. We have done all the steps listed here http://windowsxp.mvps.org/sharedaccess.htm, but nothing worked so far. Even re-installed SP3. Help, please! Thank you very much.

    Hello

    What happens if you disable the firewall?

    Run the checker (sfc) system files on the computer.

    SFC tool scans system files and replaces incorrect versions of system files by using the correct versions.

    To run the System File Checker tool, follow these steps:

    a. open an administrator command prompt. To do this, click Start, click principally made programs, Accessories, right-click Guest, and then click run as administrator.

    If you are prompted for an administrator password or for confirmation, type the password or provide confirmation.

    c. at the command prompt, type the following line and press ENTER:

    sfc/scannow

    Reference: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/system_file_checker.mspx?mfr=true

    The following article might be useful:
    After you run Microsoft Windows AntiSpyware (Beta), you have problems with the network, or you receive an error message
    http://support.Microsoft.com/kb/892350

  • print spooler is not running: xp sp3 x 86

    I uninstalled HP printer to install a new HP printer: print spooler does not work anymore, and the new printer is not installed.
    FixIt says print spooler does not start: it can fix it.

    Several files are missing:
    Ntprint.dll
    Spoolsv.exe

    Files are present:
    Winspool.drv
    printui.dll

    I ran sfc/scannow
    SFC scanned my files/CD - no report, I go back to the cmd prompt. Spooler still does not run, missing files not replaced.

    I found a lot of suggestions, none of which are the same, each with some replies saying it works & others say that the solution does not work.

    Can I copy & paste the missing files from my XP CD?
    Can someone suggest a better approach?

    Thanks in advance,
    Cathie

    Try to use the search function and specify "Search system folders" and "search for the hidden files and folders".

    Research of dllcache

    You should also try to search for your missing files.  KB234729 gave you the spoolsv.exe back?

    Files ending with a underscore should be expanded from a command prompt window by using the Expand command.  Open a command prompt window (start > run > cmd > OK) and type expand /? for the list of parameters.

    Basically, the command would be:

    expand C:\i386\spoolsv.ex_ C:\windows\system32\spoolsv.exe

  • Removed from Garmin using MSconfig and now I can't print. The print spooler is not running

    I wanted to speed up my computer and remove an item off my msconfig.  Now I can't print. missing spooler.  What should I do?  I tried dating back to some time earlier, but all previous changes are missing

    Operation could not be performed.  The print spooler is not running

    the question I wanted to delete was for Garmin

    don101947

    Hello

    I don't know if you have already solved the problem of the other answer, but here's something you can try if your not confident using the command line.

    Go to [start],-> [Control Panel]-> [administrative tools]-> [Services]

    Depending on if your running XP, Vista or 7 you can have 2 tabs at the bottom of the window you see.

    Select [Standard] if its not already selected. If you already have a large list, skip this step.

    Scroll down and find the print spooler. Double click it, and then set the "Startup type" to [Auto]

    then click [OK] and then make a right click again print spooler and select [start]

  • Under Vista 32-bit, windows update will not run.

    1. If an attempt is made to run Windows update, it displays the message that it cannot work because the windows update service is not running and the computer must be restarted.  Reboot has not fixed the problem.  Checking in MSCONFIG shows that the windows update service is running.  Tried the ap fix - it without success. Ideas?

    Hello

    Thank you for contacting Microsoft Community.

    You can go to start-> type services.msc-> press on enter. In windows, go to Windows Update. Double click on it. Make sure it is running and the startup type is set to automatic. Make sure that the following services are also running:

    Remote procedure call (RPC)

    DCOM Server process Launcher

    RPC end point mapper

    Make sure the service above are running and that their startup type is set to automatic.

    Now, reboot your PC and then try again.

    If Windows Update still fails, try this:

    Click Start-> type-> right click cmd.exe and click Run as administrator.

    Then, run the following commands:

    CD %windir%\System32

    net stop wuauserv

    Ren c:\Windows\SoftwareDistribution softwaredistribution.old

    net start wuauserv

    Response if the issue is not resolved.

  • The command could not be executed

    Some e-mail attachments will open and the message, "the command cannot be run."  It happened this week when Microsoft downloaded several updates.  Coincidence or what?

    I finally took this chance by myself and it worked.  Also, I hid IE8 so that it would not be an automatic update ever.  Unfortunately, Microsoft blew it on 8

Maybe you are looking for

  • Import the Visio drawing in Labview

    Hello I do not use standard screws to display and control. Instead I created a picture or drawing of the application who will use Labview. It's a drawing of a part of the plane that have installed controls and sensors. I would use this drawing I crea

  • HP7520 all-in-one will not scan in the document

    I'm scanning very old recipe cards.  No matter how to activate the map, or when I put it on the screen, at least one edge is cut, including the automatic feeding system, which is my preference by train.  The cards are 3 x 5 or 4 x 6.  I can't find an

  • Missing PIECES. Impossible to update.

    I give up! All I want is to upgrade my computer. I tried to update my computer for a long time now. I can't update my Security Essentials, Windows, or HP.I looked around, on the internet and finally found out that I'm missing bits in my services. So,

  • HP2310m monitor just don't look right for me

    Hello. I use a pc HP clubhouse with a HP 2310 m and Win7 6620f running. I had a disk failure hard and lost everything on my operating system disk, but the data disk is correct. I installed a new hard drive and reloaded Win7. Everything looks ok, exce

  • I wonder if I've been hacked.

    a few days before, I opened an email from a site that I opened several times before. my pc started to say "security threat. files may be damaged. call this number for assistance. "It was absolutely not normal and never happened before.  the number I