Using variable obtained using JavaScript in a widget

Hi again
I found this useful bit of JavaScript code which gets the active users name from an LMS and sets it as a variable within a Captivate course.  [link below for anyone interested]
I've seen that variables can be used in Widgets but I can't get it to work.
I've set the variable as ActiveUserName ($$ActiveUserName$$ in drop down widget) but it shows as $$ActiveUserName$$ whether I'm testing it or on an LMS.  Same result with an input box. 
Has anyone tried this before or know of a way to do this please?
Thank you
As promised, link for JavaScript to pull active users name:  Display the Student's Name From Your LMS Using Adobe Captivate 6.x - CaptivateDev.com

In Captivate 7 and 8, the Captivate defined user variable cpQuizInfoStudentName does this for you.
As far as the dropdown widget you cannot use a variable in the comma delimited list to display to the user. The result when the user makes a selection from the list can be assigned to a variable.

Similar Messages

  • How do i use variables for javascript pop up window?

    hi,
    i want to open a popup window from flash,
    as advised before i used this line :
    getURL("javascript:NewWindow=window.open('imylink.html','title','width=890,height=660,left =10,top=5,toolbar=No,location=No,scrollbars=Yes,status=No,resizable=Yes,fullscreen=No');
    void(0);");
    BUT, in flash, the URL that has to be open as do the height
    and wdth are stored as variable... imageURL, imageWidth,
    imageHeight, since i have quite a few different pages that have to
    open and they change. how can i use the values of the variables in
    the javascript code??
    is it possible at all?

    try:

  • How do I save preferences/values using javascript in dashboard widget?

    How do I save preferences/values using javascript in dashboard widget? I apologize if this is a stupid question but I simply cant seem to find a way. For example, if on teh back side of the widget teh user chooses the color of the widget, where or how do I save that value so it is retained the next time the user goes to the dashboard. Also, once saved, how do I read the value?
    Thanks a mil....

    Please look into
    /Developer/Examples/Dashboard/Goodbye World/3-Saving Preferences directory for a comple example.
    Otherwise, wait until the following book is published :-))
    http://www.apress.com/book/bookDisplay.html?bID=10173
    Mihalis.

  • Change Data Entry Template variable values using javascript

    Content ServerIs there a way to change the Data Entry Template's text/Integer variable values using javascript?

    I believe you're asking if you can change the value of a content item's property using Javascript (a content item is created from a data entry template, which defines the set of properties).
    Unfortunately there is not a way to permanently change it in the content item, since Javascript is executed client-side rather than on the server. However, if you're just interested in how the value is displayed in the published HTML, you could modify the presentation template to store the property value into a Javascript variable and then manipulate it to be displayed in whatever manner you wish.

  • Using variables for answers to fill-in-the-blank questions

    Hello,
    For fill-in-the-blank questions, one has to provide answers. I want to provide these in the form of (user-created) variables, rather than in the form of fixed strings of characters (so then, as $$var1$$ rather than as 'rabbit'). I haven't been able to get this to work. The enter variable function is indeed available (in the properties panel), but it doesn't actually work (i.e. even if you select a variable to be entered, it doesn't actually get entered).
    Is there a way around the problem?
    1. NB that this same issue holds for text entry boxes (rather than fill-in-the-blank questions). If I could get this to work for text entry boxes, I would use them rather than fill-in-the-blank questions.
    2. One can use variables for answers to multiple choice questions. So I'm hoping I can get it to work for fill-in-the-blank questions as well.
    Thank you in advance. Marvin DuBois

    That would have been my suggestion. I don't have a dedicated blog post, but use TEB's for that kind of questions myself as well. And contrary to the widget/interaction I mentioned before, a TEB is an interactive object, which means it can be validated and there can be a score attached to it. But, it will not help you, since you have to add the correct answers in the same way as for a dropdown list in the FIB question (they are sort of TEB's there). And it is that list that doesn't allow to enter a variable instead of a fixed sequence of characters.
    Which means that you are back to the advanced actions, same as in my blog posts with the widget/interaction.
    Have a workaround (after all I am the workaround Queen) to have reporting, if you need to check only one TEB, described here:
    http://blog.lilybiri.com/report-custom-questions-part-2
    The idea is to use another interactive object that can have a score. In reality I use two instances of that same object: one with score 0 and one with score X and show the right one depending on the conditional action.
    However if you want to have multiple TEB's on the same slide, that have to be checked all with the same advanced action, than you'll need either the Mastery widget by InfoSemantics (only for SWF output) or Javascript.
    Lilybiri

  • Using Variables in Multiple slides

    I am using a text entry box to record information.
    I want the user to repeat that information in a future slide to get a match. I have created the action script for that.
    On the second slide however, I would like the user to be able to view what they typed in the first tex entry box without returning to that slide. Like a hint.
    Is their way to do that?
    Thanks

    Hello,
    Perhaps you know that each TEB has an associated variable (better give it a more signicant name than the default one). I could offer you a workaround to show the value of this variable, but think that the most simple solution is to get a copy of the enhanced TEB, a widget created by Jim Leichliter, AKA CaptivatePro. Here is the link:
    http://captivatedev.com/2010/09/08/adobe-captivate-widget-using-variables-in-the-default-t ext-of-a-text-entry-box-teb/
    Have a look around on his site, he has a lot of enhanced widgets to display variables associated with TextArea, Checkboxes and RadioButtons widgets as well.
    Lilybiri

  • Using variable/s in SOM expression... how?

    Hello all,
    Sometimes its the simplest things that are the most confusing (for me anyway). For example:
    I have a static table in a form in which the cells in one column each contain a checkbox.
    The reference for each checkbox would be:
    Table1.Row1.ckbox[0]
    Table2.Row2.ckbox[0]
    Table3.Row3.ckbox[0]
    and so on.
    I have a button elsewhere on the form, which when clicked would set each of the checkboxes in the table to "1" or checked, and would uncheck them all when clicked again.So I'm thinking a simple for loop would do the trick.
    var i
    for i = 1 upto 12 do
         Table1.Row[i].ckbox = 1
    endfor
                   ---OR---
    for (var row = 1; row < 13; row++)
        form1.main.front.Table1.Row" + row + ".CheckBox = 1;
    Neither works.
    Is it the syntax, or something else entirely? Any pointers to examples of how and when to use variables in SOM references would be extremely appreciated.
    Thanks
    Harry Ohm.

    Hi Harry,
    You need to resolve the node in Javascript, so the following should work:
    for (var i=1; i< 13; i++)
        xfa.resolveNode("form1.main.front.Table1.Row" + i + ".ckbox).rawValue = 1;
    The way you have stated the name of the checkbox "Table1.Row1.ckbox[0]", indicates that there may be more than one ckbox in each row. If that is the case then you may need to replace .ckbox in the script with .ckbox[0].
    Hope that helps,
    Niall
    Assure Dynamics

  • Problems getting started using Variables & Datasets

    Hello,
    I am new to this forum and new to scripting in Illustrator and scripting in general.
    I have an XML file containing a number of datasets each consisting of a number of text variables which I want to use to create a deck of trading cards.
    Each trading card consists of a Text Field for the title of the card and a number of icons, which are instances of various Symbols
    I have written a script to create each card and i can load the variables into my javascript using: newCard.importVariables(new File(xmlPath));
    I now need to access the data in the datasets in order to populate the card.
    To provide some context, this is an image of one of the cards with placeholder art:
    Currently, for the icon in the top right hand corner (the PHASE icon) I am using the following code:
    phase = "night";
    phaseIcon = newCard.symbols.getByName(phase);
    phaseIcon1 = newCard.symbolItems.add(phaseIcon);
    phaseIcon1.top = 232;
    phaseIcon1.left = 140;
    What i want to be able to do, is to pull the value for the <phase></phase> TextVariable from my XML dataset and insert that into the script, but I don't know how. This is where I am stuck as to how to proceed. Any help is greatly appreciated.
    Thanks,
    Nick

    Thanks for posting. I can't give a reason for my choice of software and scripting language other than I *love* Illustrator and have yet to get to grips with InDesign and javascript is a language I have been trying to teach myself and am most familiar with.
    I have been reading through the ExtendScript Toolkit Javascript docs and have managed to get this working:
    idoc = app.activeDocument;
    var wolfCardsXML = new XML ( "<wolfcards> <card> <title>Wind Through the Trees</title> <phase>dusk</phase> <fear>fear1</fear> <weather>weather1d</weather> <bonus1>pluck1</bonus1> </card> </wolfcards>" );
    var currentCard = wolfCardsXML.card[0];
    var phaseValue = currentCard.phase.toString();
    var phaseIcon = idoc.symbols.getByName(phaseValue);
    var phaseIcon1 = idoc.symbolItems.add(phaseIcon);
    This works fine to read the XML data, pull the <phase> value and then use that to pull a Symbol of the same name and place it on the artboard, which is exactly what I want to be able to do. Obviously tho, I have 100+ <card> elements i want to store and loop through to produce all the cards in the deck, but it seems that new XML () will let me do this if i can just pull in the xml data from a txt file as one long text string. Could anyone please suggest a way of being able to do this? Thanks

  • Use function from external Javascript file

    Hi All,
    Is it possible to use function from other javascript file. If possible then please post some example.
    Shonky

    As Harbs mentioned, you can use doScript().
    Maybe you can do something like this:
    First I created simple function in separate file and exported it JSXBIN
    function myAlert(myString){
        alert(myString);
    Then, I copied contents of that JSXBIN and put it into variable
    var securedFUNCTION = app.doScript("@JSXBIN@ES@[email protected]AffABC40BhAB0AzHjNjZiBjMjFjSjUDAC0EzAEByB");
    or
    var securedFUNC = eval("@JSXBIN@ES@[email protected]AffABC40BhAB0AzHjNjZiBjMjFjSjUDAC0EzAEByB");
    And simply called function
    myAlert('My test String');
    Also, you can use include external script with #include to call JSXBIN, but you need to wrap contents of JSXBIN file into doScript or eval().
    tomaxxi
    http://indisnip.wordpress.com/

  • How to use result obtained from clientContext.executeQueryAsync

    i have to use result obtained from clientContext.executeQueryAsync for condition in code.But, now i face problem that clientContext.executeQueryAsync result not obtained when needed.

    Hi,
    I suggest you provide more information about your requirement(your code) or error messages for further research.
    If you want to get list items using JavaScript Client Object Model(JSOM), the following articles for your reference:
    How to: Retrieve List Items Using JavaScript
    https://msdn.microsoft.com/en-us/library/office/hh185007(v=office.14).aspx
    Working with the ECMAScript Client Object Model (JSOM) in SharePoint 2010–Part 3
    http://blogs.msdn.com/b/sharepointdev/archive/2011/07/19/working-with-the-ecmascript-client-object-model-jsom-in-sharepoint-2010-part-3-nikhil-sachdeva.aspx
    We can also use REST API to achieve it.
    SharePoint 2013 – CRUD on List Items Using REST Services & jQuery
    http://www.plusconsulting.com/blog/2013/05/crud-on-list-items-using-rest-services-jquery/
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Dennis Guo
    TechNet Community Support

  • Error-Receiver File Adapter using Variable substitution when file is empty

    XI Experts,
    We are on PI 7.0, SP14.
    We are using variable subtitution to get the filename from source message. This works fine as long as we have data in the payload for filename element. But we have a scenario where we don't have to create file when certain condition does not exists in source message so in the message payload filename element will not exists in such condition and file will be empty and we should not create file.
    Parameter in the communication channel for Handling empty message is "Ignore".
    Does anyone knows how to handle this scneario. We don't want to default any file name in the message mapping if source file name element does not exists.
    We are following getting error in the Adapter engine.
    MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: file: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: file
    Thanks
    MP

    You can implement this by writing the module to throw an exception or whatever method you want to execute.
    If you don't want to receive an error message then module is suitable for you.
    Gaurav Jain

  • I am trying to change the email address associated with my existing account to free up my university email address for use in obtaining Creative Cloud.

    I am trying to change the email address associated with my existing account to free up my university email address for use in obtaining Creative Cloud.  Every time I go to the account settings of my existing account (which currently uses my university email, as I set it up years ago and had no idea it'd eventually cause problems), I enter a different email to use for that account but I continuously receive an error message saying "account changes cannot be saved."  It makes me think that it's because the email isn't verified (funny, it actually is verified since it has been the alternate email on the old account for years), but when I click the "send verification email" nothing happens (that is, no email is sent to that other email address).
    Anyway, my university is now requiring that faculty create new accounts using our university email addresses in order to register/use Creative Cloud.  Am I able to delete my old account, or can anyone help me actually change the email address associated with my old account without getting a "changes can't be saved" error?

    This is an open forum, not Adobe support... you need Adobe support to help
    Adobe contact information - http://helpx.adobe.com/contact.html
    -Select your product and what you need help with
    -Click on the blue box "Still need help? Contact us"
    or
    Make sure that EVERY DETAIL is the same in every place you enter your information
    -right down to how you spell and punctuate the parts of your name and address
    Change/Verify Account https://forums.adobe.com/thread/1465499 may help
    -Credit card https://helpx.adobe.com/utilities/credit-card.html
    -email address https://forums.adobe.com/thread/1446019
    -http://helpx.adobe.com/x-productkb/global/didn-t-receive-expected-email.html

  • Using variables to insert data in the table

    I want to insert datas in the table. I use constants,
    all the constants are stored properly in the table. But,
    when I use variables I get the error message
    "Too few parameters. expected 6".
    (I declared all the fields of the table as text only.)
    My program is "newt.jsp"
    <%@ page language="java" import="java.sql.*" %>
    <html>
    <head>
    <title>storing customer information in the database</title>
    </head>
    <body>
    <%
    String cno1 = request.getParameter("cno");
    String n1 = request.getParameter("n");
    String add11 = request.getParameter("add1");
    String add21 = request.getParameter("add2");
    String phone1 = request.getParameter("phone");
    String email1 = request.getParameter("email");
    Connection con = null;
    try {
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con = DriverManager.getConnection("jdbc:odbc:customer"," "," ");
    Statement statement1 = con.createStatement();
    Statement statement2 = con.createStatement();
    statement2.executeUpdate("create table cust1 (cno varchar(20),n varchar(20),add1 varchar(20),add2 varchar(20),phone varchar(20),email varchar(20))");
    statement1.executeUpdate("insert into cust1 (cno,n,add1,add2,phone,email) values(cno1,n1,add11,add21,phone1,email1)");
    catch(SQLException sqle) {
    System.err.println(sqle.getMessage());
    catch(ClassNotFoundException cnfe) {
    System.err.println(cnfe.getMessage());
    catch(Exception e) {
    System.err.println(e.getMessage());
    finally {
         try {
         if(con!=null) {
              con.close();
    catch(SQLException sqle) {
    System.err.println(sqle.getMessage());
    %>
    <br><br>
    Mr./Ms. <%=n1 %> <br>
    Your datas have been stored.<br>
    </body>
    </html>
    Those who know answer please reply.
    My thanks in advance.

    I would expect your insert statement to be this:
    statement1.executeUpdate("insert into cust1 (cno,n,add1,add2,phone,email) values('"+cno1+"','"+n1+"','"+add11+"','"+add21+"','"+phone1+"','"+email1+"')");
    If you just create a string, it's not going to fill in variables into the string by magic.

  • How to obtain date of creation if image is obtained using getImage()

    When Image is obtained using getImage() method , how to
    obtain date of creation or another header value if image is
    obtained using getImage method.

    Actually, some formats do indeed have creation or modification dates built in. e.g. http://www.w3.org/TR/PNG-Chunks.html#C.tIME. (Of course since most programs save a new copy of the file every time, the two dates are the same.) However, just because formats have this data doesn't mean it's reliable or even present. Your best bet is to pass creation dates in an Applet param tag for applets (assuming you were referring to Applet.getImage()) or to parse out a filename from a classloader URL and use a File object to check (assuming you were instead referring to Toolkit.getImage(URL)). That's the best answer I have without knowing more about what you are trying to accomplish.

  • Hi, We have an application  built using HTMl 5 and Javascript running on IPad2, iOS5.1 Safari 5.1. When we try to download a file(.pvw file) in that application safari throws "Download failed" error. Please suggest what needs to be done.

    Hi,
    We have an application  built using HTMl 5 and Javascript running on IPad2, iOS5.1 Safari 5.1.
    When a file url is clicked instead of asking for Save or Open or Cancel options, the file gets opened on IPad by default.
    Is this default behaviour which cannot be changed or can it be configured to ask user preference?
    When we try to download a file(.pvw file -> a model file) in the above application, safari throws "Download failed" error.
    Please suggest what needs to be done.
    Regards,
    Pramod

    Safari on an iPad in general does not allow downloading of files. That's a safety precaution in the iOS SDK to keep unauthorized content off of iOS devices. Safari will open from the web site file types that it can handle, but direct downloading isn't normal behavior, and I don't believe the behavior can be changed, though you can try asking in the developer forum, either here or the one to which you have access as a member of Apple's iOS developer program.
    Regards.

Maybe you are looking for

  • Maybe it's time for an Erase and Install???

    Things were getting a bit sluggish (like 90% speed drop, and beach balls every few minutes) on my main HD (MacHD), so I created a new backup on my external HD (MacBkup).  This is a cloned, bootable copy, created via Carbon Copy Cloner.  Sluggishness

  • How do I change the default PDF reader from Acrobat Pro to Preview?

    Right now Acrobat Pro is set as the default PDF reader in my Safari 3. It's slow and wonky, which I think might be a 10.5 issue. Anyway I'd like to make Preview my default PDF reader for Safari but I can't find where to make this change.

  • Not using my index !!!

    i have 3 tables: customer (has over 120,000 rows) business workplace I'm doing a query which is blowing out (time wise) due to the fact that it's not using the index which i have specified on the customer table. The index which is specified on the cu

  • How can I delete user and password saved in Safari

    Hi, this is the first time I use Apple Support Communities. I have a problem with Safari. I want to delete the information of users and password of Safari's autofill, so I go to Safari - Preferences - Autofil - User and password - Edit, and when I cl

  • IOS 7 introduced bugs to Numbers Forms

    The Forms feature of Numbers stopped working after I installed iOS 7. Some of the data entry boxes in Numbers Forms are not visible until I move to the next entry. Numbers itself crashes about 25% of the times I try to return to the spreadsheet. have