Accessing c4 Variables in Javascript

How do you pass a Captivate 4 variable (User or System) in Javascript when the published .SWF is embedded in another tool like Lectora or Flash?
In Captivate, you can set a value into a Lectora variable (VARmyLectoraVariable.set('myvalue');, but I don't know how to access the Captivate variable.
When run from Captivate, this works:
Captivate.GetVariable('CaptivateVariable');
But when the published .swf from Captivate is inserted into Lectora and run, I get a JavaScript error ('Captivate' is undefined).
How do you reference the Captivate variable in JavaScript when the .swf is not embedded in the Captivate project html file?
Thank you!

http://pipwerks.com/journal/2009/06/07/introducing-the-captivatecontroller/
check this out

Similar Messages

  • Access PageFlowScope variable in JavaScript

    Hello,
    I need to access the pageflow scope variable inside a Javascript on window.onbeforeunload event in Jdev11g.
    Any pointers?

    Hi,
    tecnically PageFlow scope is a Map in sessionScope and this not accessible from JavaScript. What you can do
    - use clientListener to invoke JavaScript method which the invokes a serverListener to call a managed bean
    - have the managed bean accessing the pageFlo scope attribute
    - have the managed bean calling back the client by executing JavaScript using the ExtendedRenderer Kit as explained in chapter 5 of http://download.oracle.com/docs/cd/E15523_01/web.1111/b31973/toc.htm
    As John said, the use case would be good to learn about because information can also be added on clientAttributes (af:clientAttribute)
    Frank

  • Access private variables from javascript

    Hi.
    How can i access my objects and varibles, in my java code from my javascript.

    Try displaying the value before you assign it.
    If you wanna display the value of a text field called textCallClass, this is the javascript code:
    alert(document.getElementById("form1:textCallClass").value);
    And if you wanna display a field called uniqueNum from a page called
    SchemeHolders, this is the javacsript code:
    alert(#{SchemeHolders.uniqueNum});
    You have ro have a public function called getUniqueNum in SchemeHolders.java. And ensure the case is exactly like mine is.
    That does work fine in my programs, if you have any other problems, post the error message.

  • Can JavaScript access JSP variable?

    Could we do this? Or, how could we have JavaScript access JSP variable?
    <%
    String fooBar = request.getParameter(......
    %>
    <script language="JavaScript">
    <!--
    if (fooBar  == ...) {
    -->
    </script>

    To access the variable in Javascript you'll have to
    write it out from the JSP. You'll need to do something
    like:
    <%
    String fooBar = request.getParameter(......
    %>
    <script language="JavaScript">
    <!--
    var fooBar = '<%=encodeQuotes(fooBar)%>';
    if (fooBar  == ...) {
    -->
    </script>You'll need to either make sure fooBar doesn't contain
    any quotes or write a function to replace each ' with
    \'.Thanks!
    That works perfectly, without encodeQuote() method in my current case.
    Thanks again. You ar a saviour.

  • How can I access JSP variables from a JavaScript function in a JSP page?

    Respected sir
    How can I access JSP variables from a JavaScript function in a JSP page?
    Thanx

    You may be get some help from the code below.
    <%
        String str="str";
    %>
    <script>
        function accessVar(){
           var varStr='<%=str%>';
           alert(varStr);// here will diplay 'str'
    </script>

  • How can i access and assign java xml Document variable in javascript block

    How can i access and assign org.w3c.dom.Document variable in javascript block
    I tried this xmlDoc = "<%=xmldoc%>";
    it is not working
    plz give me solution.
    thanx
    Vidya

    The solution would only work on MS IE browsers, as other browsers do not support an XML DOM.
    It can be done, but you would be stuck with using the Microsoft broswer. If that is acceptable, I have some example code, and a book recommendation.

  • Accessing JSP variables in Included Javascript

    Hey All,
    I want to hide my javascript to be viewed on the client browser.
    I know we can do that with the javascript include ,But i am using JSP variables in
    Included javascript.I can't access those variables any more.
    Does anybody know any workarround.
    Thanx
    Vijay

    Hi Vijay,
    I am also facing the same problem of hiding javascript in the client browser. My javascript variables are getting initialised on the fly using JSP. Since JSP is compiled on the server side, one can't compile .js file on the client side.
    What u can do is to divide your page into frames with
    <frameset rows="100%,0%">. Now put your form hidden fields or the .js file in frame 2 which is not visible to the user and then assign your jsp variables in the frame2 html/jsp page. Now access your variables from frame2 in frame1 using
    var i = parent.frames[1].document.forms[0].elements[0].value
    Assuming that there is 1 form and 1 hidden field in frame2 html/jsp page.
    I hope u get the logic rite....
    I had done it for application but problem is that our users are real MORONS and they keep doing ctrl+F5 which takes them to the Indexpage.
    If you get some other solution then please mail it to my email address
    [email protected]
    Regards
    Vimlesh

  • Accessing Instance variables from within javascript

    Is it possible to access Instance variables of a JSP using
    javascript? If so, an example would be very much appreciated.
    LaMont

    <script language="JavaScript">
    var scriptVar = "<%= jspVar %>";
    </script>

  • Accessing substitution variables in static uploaded javascript file

    Hi there,
    I just created variables and a pageinit function in my page header and try to access these variables (Flow_Id, Page_Id etc) within a js-file I uploaded into workspace static files.
    I try to use them within an URL ( e.g. "f?p="+ Flow_Id + ":100:" + Session_Id ), but they are -undefined- and thus lead to a 404-Page!
    Here is the code:
    onload="pageinit()"             //in page html body attribute
    //and the following code in the html header
    <script type="text/javascript">
    <!--
    var Flow_Id; // application id
    var Page_Id; // page id
    var Session_Id; // session id
    var Request; // request value
    function pageinit(){
    Flow_Id = html_GetElement('pFlowId').value; // application id
    Page_Id = html_GetElement('pFlowStepId').value; // page id
    Session_Id = html_GetElement('pInstance').value; // session id
    Request = html_GetElement('pRequest').value; // request value
    //-->
    </script>Can someone please point me to the right direction!?
    Thank you very much.
    Regards
    Johnny

    Hi Paul,
    I tried with IE 8 now and could at least find out now, which lines of code are responsible for the error:
    addmenu(menu=[                    
    "mainmenu",                    
    69,                         
    153,                         
    1,                         
    style1,                         
    1,                         
    "left",                         
    1,                          
    0,                         
    ,"Home","f?p=" + $v('pFlowId') + ":100:" + $v('pInstance'),,"",1 // "Description Text", "URL", "Alternate URL", "Status", "Separator Bar"
    ,"Tab2","show-menu=list01","tab2.html","",1
    ,"Tab3","f?p=300:1:","tab3.html","",1
    ,"Tab4","show-menu=list04","tab4.html","",1
    ])It must be the way I try to create the first URL (for Home) I already mentioned, because if I hard-code the URL, it works without errors.
    I could hard-code the URL, but then I always get a new session-id. So, at least I need to find a way of accessing the current session-id here.
    As mentioned before, I also tried to set global variables within a javacript function in the page header and assigning the current values for the session and app-id and reference these variables within the js-file I uploaded to the static files. But that did not work either. These variables were undefined.
    I guess they were undefined because at the time when the function was processed the variable might not have been set yet.
    But I followed exactly the solution Carl Backstrom mentioned in some of his posts some years ago. God bless him.
    I am not a javascript expert, so maybe you got a hint for me!?
    Thanks again for your support.
    Johnny

  • Public variables in javascript

    how i can use public variables in javascript along with ADF. I am declaring a variable at the top of list but when an event is generated by ADF and i tries to access that variable, it gives me an error of undefined.
    Kindly help me

    Not directly, but you can with this:
    http://java.sun.com/products/plugin/1.3/docs/jsobject.html
    See also:
    http://www.codeproject.com/jscript/javatojs.asp?df=100&forumid=736&exp=0&select=700857

  • Access session variable in Java Function in JSP

    Hi Experts !!
    I am developing an application using STRUTS MVC...
    Very sorry if u have problem understanding my question, i ll try to improve... and sorry if i can't post codes here
    Basic question is ....
    I want to open a word document on pageLoad of JSP, the word document is not a single document, there is a form in which there is a "name" and "template" whenever user clicks on a button there is one action attached to it which creates a copy of that template in a different folder.. on the next page OnLoad i want to open that particular document. for that i have created a variable and also have set in the session, just want to access it in the below code.
    I have a formbean in which i have a variable, the scope is session, that variable i have put it in session also. but i want to access that variable in a "java function" in JSP so that "onLoad" page that function should work.
    JSP---
    <script type="text/javascript">
    function openDocument() {
    var w = new ActiveXObject("Word.Application");
    var docText;
    var obj;
    var a;
    if (w != null) {
    w.Visible = true;
    obj = w.Documents.Open(I HAVE TO ACCESS THAT VARIABLE HERE);
    </script>
    FORMBEAN----
    public class CreateSOWFormBean extends ActionForm {
    private String workflowName;
    private String comment;
    private String sowTemplate;
    private String sowFileCreated;
    public String getSowFileCreated() {
    return sowFileCreated;
    public void setSowFileCreated(String sowFileCreated) {
    this.sowFileCreated = sowFileCreated;
    sowFileCreated is the variable that i have accessed in session and that value i have to pass in that function in JSP....
    I am aware of something like
    obj = w.Documents.Open(<%'sowFileCreated'%>);
    but i m not sure how to write....
    Plz help.....

    If you're working under a framework like struts you should definitely be using JSTL tags rather than scriptlet code to access variables within the page. With JSTL code <% codes can be almost entirely avoided.
    To transfer a value from a Servlet to a JSP don't use a session variable, use a request attribute. Session variables should only be used when values have to survive from one transaction to another.
    You can write something like:
    obj = w.Documents.open('<c:out value="${openURL}"/>');in the Javascript portion of your JSP.
    Just beware of potential problems with quotes. The coresponding code in the Servlet would be like:
    request.setAttribute("openURL", openUrl);

  • How can we  use java variable in javascript code on JSP page?

    How can we use java variable in javascript code on JSP page?
    Pls help

    Think about it:
    JSP/Java is executed on the Server and produces HTML+JavaScript.
    Then that HTML+JavaScript is transfered to the client. The client now interpretes the HTML+JavaScript.
    Obviously there's no way to access a Java variable directly from JavaScript.
    What you can do, however, is write out some JavaScript that creates a JavaScript variable containing the value of your Java variable.

  • Access Custom Attributes in JavaScript and in Transactions

    Hello,
    I try to work with custom attributes. I've problems accessing the values in JavaScript and in transactions, but it works fine within .irpt pages.
    What's the trick?
    For a custom attribute called PLANT, can I write something like this in JavaScript?
    var p = ;
    Is there a way to access custom attributes in the Link Editor of an Action Block?
    Kind Regards,
    Matthias

    Hi Matthias,
    it is not possible to integrate that kind of MII variables in JavaScript like you discribed before.
    You are right that this kind of expression is possible in the .irpt file. The reason why it is working in the .irpt
    but not in the .js is, that the MII script parser is only replacing in HTML content. Everywhere you have
    scripting the parser will not replace the {...} markings (since the curly brackets also show start/end of functions aso.).
    Variables to JavaScript
    The easiest Way to get those variables is to create hidden fields in the .irpt file that you can access via JavaScript.
    For example:
    <input type="hidden" id="hidden_plant" value="{PLANT}" />
    This will be parsed to (e.g.)
    <input type="hidden" id="hidden_plant" value="Karlsruhe/DE" />
    Now you can access this value in JavaScript via:
    document.getElementById( "hidden_plant" ).value;
    Variables to Transactions
    To parse custom variables to a transaction you first have to specify corresponding transaction variables in the
    transaction itself. After saving the transaction you can map those variables to Parameters in the Xacute-Query-Editor.
    Including this transaction to your webpage you can simply assign the required value to the corresponding parameter.
    For example if you mapped the Plant variable of the transaction to Param.1 you can specify the information in the .irpt
    like:
    <applet id="trx_test" ....>
      <... />
      <param name="Param.1" value="{PLANT}" />
    </applet>
    Another possibility is to set the value dynamically via JavaScript if you use:
    document.getElementById( "trx_test" ).getQueryObject().setParam( 1, "Karlsruhe/DE" );
    Native access to user variables via the BLE is not possible (as far as I know).
    I hope this is what you wanted to hear?
    Best Regards
    Sebastian
    Edited by: Sebastian Holzschuh on Jun 10, 2008 12:16 PM

  • How to access Workflow variables in Form Designer?

    Hello,
    I am wanting to set certain subforms to readonly depending on which part of the workflow the form is currently on. I already have the JavaScript code working to set the subform fields to readonly, but now I cannot figure out how to trigger this and where do I keep a variable to keep track of which part of the workflow I am currently in.
    I assume I will have a variable in the workflow itself and then I can use the Set Value QPAC to change the variable for each workflow step before it goes to the User QPAC, but what about within the form? I don't understand how the form javascript will know to execute, so how does my workflow "talk" to the form to set these fields to readonly?
    Right now the JavaScript code is sitting in the root::initialize part of the form. I was assuming I could have something like "if my workflow variable is equal to XX then set this subform to read only". But, how do I access my workflow variable in the form designer?
    Also, since I have digital signatures, I am having to pass all the form data in document variables, will this affect how I need to do this? I was also thinking of possibly accessing/setting a hidden field in the form, but thought the above way may be better.
    I hope that made sense!
    Thank you,
    Jennifer

    To follow-up, I spoke with Adobe support this morning and they said that I cannot access Workflow variables within Designer (besides those Workflow variables that are already provided).
    He mentioned that if I use the hidden fields, that I would need to Render the form each time before going to the User to trigger this to happen. So, I am not sure what I will do just yet. I probably not worry about making the fields readonly for the time being; it was a little extra thought I had and isn't required for our process.
    Thank you,
    Jennifer

  • [CS3] How to add via plugin some variable into javascript object model?

    Otherwords i need access to some plugin variable from javascript.

    The BPI plugin source is pretty well documented via comments. If you don't like page items, search the .fr for any reference to "page item" and "PageItem", then remove those references.
    Depending on your specific purposes, also eliminate the persistent BPIDataPersist and related, or anything with "Panel" in it. This should give you a very minimum plugin.
    If you don't want a structure that behaves like a "prefs", remove kBPIPrefsScriptProviderBoss and all related.
    To add a property on a another boss rather than on page items, just replace kPageItemObjectScriptElement in the kBPIScriptProviderBoss of the VersionedScriptElementInfo, e.g. with kApplicationObjectScriptElement.
    app.documents is probably not what you want to follow, because that is a collection rather than an array so you would be implementing an own object type.
    Of course, keep a copy of your intermediate steps and whenever too much breaks, retry. That's how we all started ...
    Dirk

Maybe you are looking for

  • Aperture Library Error There was an error opening the database for the library

    Date/Time:       2012-11-28 21:23:09 -0800 OS Version:      10.8.2 (Build 12C60) Architecture:    x86_64 Report Version:  11 Command:         Aperture Path:            /Applications/Aperture.app/Contents/MacOS/Aperture Version:         3.4.3 (3.4.3)

  • Need help resolving issues with reader X

    whenever adobe tried to update reader it alwaus fails and says I ahve to be in administrator mode, I read on the net that id you right click on a .pdf and go to the advanced tab you can select run as administrator. I did that hoping that would allow

  • Basic doubt in serialization

    Hi, SUN gives JDK for windows/solaris platform, and IBM and HP write for their own platform Suppose if there is a rmi communicatin from windows platform to Hp-UX you have two different implementation of jdk (though both are same version). Let us cons

  • Hyperion Web Analysis Printing

    We have created several reports in Hyperions Web Analysis that we would like to print; however, when printing it gives us no option to adjust Margins. Does anyone know if there is anyway to change the preset margins of 1 inch on reports? Is there a b

  • Continuous Wi-Fi drop out on iPad2

    My iPad 2 loses Wi-fi connection every few minutes when I'm using it upstairs. Proper driving me mad. Have tried all the usual re-setting the router nonsence and it still does it. Using a BT Home Hub 3. Anyone know a solution please? I've seen this,