Captivate: Using Javascript to show/hide captions text

Hello

I want to show/hide a legend of text using javascript. I can't find the way to do it with advanced actions. I don't know if it's because it belongs to a question slide in a pool. Anyone know if this is possible and how this can be done?

There is nothing wrong with your English - no need to apologize :-)

I just tested it. Seems to work for me to create a tip action that will show my custom legend if I set a variable of personalized tour. Rather than xplain, I have attached a word with some screen shots doc and an example of file CPTX. File is Captivate 5, but even should work in 5.5

Steve

Tags: Adobe Captivate

Similar Questions

  • How to show/hide conditional text on the text selected with the FDK API

    Hello!

    Do you know how to show/hide conditional text in a selected text using the FDK API? I managed to do it on the whole document, but I need to do on specific selected text...

    Thanks in advance,

    Stefano

    Hi Stefano,

    This is not possible, the conditions are the properties of the document and cannot be changed from visible to hidden or v.v. for the full document.

    If you really need a more detailed method, you must create a separate condition for the selected text.

    -Michael

  • Problems with reset toggle buttons that show/hide captions

    I have a problem with the buttons toggle that I use to show/hide a number of legends about a single slide of the reset. The rocker works very well on the first button when I click on and off to show or hide a legend. A simple click on and watch legend. One click off the coast and the legend disappears. However, if I leave a legend that is displayed and click on other buttons to show/hide the other legends, they do not show or hide in a single click. They require two clicks. It seems that something continues the read head after that first toggle is used until there is a second click. The same thing happens if I reset to enter action. If I click on a caption and leave it in place and move to another slide, it disappears when I re - get this initial slide. However, it requires two clicks, not one alone, to display the legend. I find it very strange; I learned most of my techniques from the Lilybiri blog, but this problem does not occur on his examples. I think I'm missing something obvious, but may not know what it is. Any help is very appreciated.

    if_aa.jpg

    else_aa.jpg

    reset_aa.jpg

    Yes, I use Cp6. What I wanted to say about re-use, is that I have different scenarios where a similar script could be used, if your suggestion of a model is a good. My original intention was to write it in a txt for reference. Thank you very much for all your suggestions and links. I'll keep you posted.

  • Show/hide conditional text to a book level

    I use TCS2 on Windows XP.

    9.0 FM p250

    I have several files as part of a great book of FM. Each file has the same conditional text tags. Can I, at a level of book, put my conditions to show/hide, etc. and then update the book? So far, I don't know how to open each file, define the TEXT CONDITIONAL SHOW/HIDE like I need (is not to show very indicators and according to my built-up expression) then save and close each file.

    Is there a way to make all my files at once? Note I want them all put the same way... so that might make it easier...

    Thank you

    Adriana

    adrianaharper wrote:

    I use TCS2 on Windows XP.

    9.0 FM p250

    I have several files as part of a great book of FM. Each file has the same conditional text tags. Can I, at a level of book, put my conditions to show/hide, etc. and then update the book? So far, I don't know how to open each file, define the TEXT CONDITIONAL SHOW/HIDE like I need (is not to show very indicators and according to my built-up expression) then save and close each file.

    Is there a way to make all my files at once? Note I want them all put the same way... so that might make it easier...

    Thank you

    Adriana

    I do not have FrameMaker available right now, so I work from memory, using FrameMaker traditional menus, rather than the FM 9 tools.

    Select all the files in the window of the book. With the asset book window, open the view menu and search for conditional text. Your settings here apply to all the files selected in the address book window, so it is possible to establish conditions on some or all of the files. CTRL + click to select non-contiguous files; Shift + click to select a range of contiguous files.

    HTH

    Kind regards

    Peter
    _______________________
    Peter gold
    Know-how ProServices

  • example JavaScript to show/hide layer of BCG in Acrobat DC

    I saw this question a couple of times but not enough answers, so I'll ask a little more precisely.

    I have a listbox with three different option (option 1 is 'Blue', is a 'Green' option 2 and option 3 is "Yellow")

    There are 3 matching layers named BlueLayer, GreenLayer and YellowLayer.

    When 'Blue' is selected in the drop-down list, I would like BlueLayer to show (but not GreenLayer or YellowLayer).

    When 'Green' is selected in the drop-down list, I wish GreenLayer show (but not BlueLayer or YellowLayer).

    When 'Yellow' is selected in the drop-down list, I want to show YellowLayer (but not BlueLayer or GreenLayer).

    My theory is that if I select the box that says commit selected value immediately, I should be able to run a javascript script on the MouseUp command allowing the correct corresponding layer to show.

    Could someone show me an example of what this javascript would look like or suggest a better way to do it?

    I know that Radio buttons are another option, but in the end, I prefer a list because of the design of the form box.

    BTW, I'm new to using javascript in Adobe Acrobat so if I'm completely off base with my way of thinking, please point me in the right direction.  Thank you in advance!

    First, you must use the Validate or Format, not MouseUp events. I prefer to use the old.

    Here's how I'd do:

    var layers = this.getOCGs(0); // let's say the layers are only on the first page of the file.
    for (var i in layers) {
        if (layers[i].name=="BlueLayer")
            layers[i].state = (event.value=="Blue");
        else if (layers[i].name=="YellowLayer")
            layers[i].state = (event.value=="Yellow");
        else if (layers[i].name=="GreenLayer")
            layers[i].state = (event.value=="Green");
    }
    

    If the layers appear on multiple pages, and then you add another loop around the code, to go through all the pages, but the basic concept is the same.

  • Show / hide the text box drop-down list database

    Hi all

    First time post here - wahoo!  :-)  Brand new user of LiveCycle, and so far I'm loving - very cool app!  I am a bit puzzled, however, and hoping someone can help...

    I am using LiveCycle version 8.05 and try to build a form that has a drop-down list with departments in our Organization.  If the user selects the elements 1-5 on my list, I want two other fields at autopopulated (one for the Admin Assistant) and one for Dept Head.  If however the user selects 'Other', I want a text box (it will be hidden the rest of the time) where the person will be able to type in the Department they work for.  For now, I'm only interested on getting the box 'Other' to appear; I'll worry about the other stuff later.

    Elsewhere in my form, I have a functioning drop-down list that displays a text based on the selection field; However, for some reason this logic does not work with the situation described above.

    My code for the working text field is (in JavaScript)

    var
    
    (sNewSel)
    case "1": 
    switch
    {
    
         TextField6.rawValue = "My text is in here";
    break;
    case "2":
    
    
    
    = "My second text is in here ";
    
    
    break;
    "3":
    
    case 
    
    = "My third text is in here.";
    break;
    TextField6.rawValue
    
    default:
    }
    break;
    
    
    TextField6.rawValue 
    
    
    sNewSel = this.boundItem(xfa.event.newText);
    

    After many fruitless hours yesterday, I got only to the extent where the code below; This was more or less copied right out of a post here.  When I click on the drop-down list, select 'Other', the text field is displayed.  I tried the definition of the text field to the times 'Hidden' and 'Visible' through properties of the object, but no luck.  I tried to use IF statements, subforms and anything else I could think of but am getting nowhere.

    var nSubLength = Subform1.nodes.length;
    var 
    sSelectField 
    for
    
    {if
    {switch (xfa.event.newText) 
    (case "6":
    Subform1.nodes.item(nCount).presence
    break
    default:
    Subform1.nodes.item(nCount).presence
    break
    }
    }
    }
    ;
    = "invisible";;= "visible";((Subform1.nodes.item(nCount).className == 
    "field") &(Subform1.nodes.item(nCount).name== sSelectField)) 
    (var nCount = 0; 
    nCount < nSubLength; 
    nCount++) sSelectField = fieldList.rawValue;
    = sSelectField.replace(' ', '');

    Any ideas?  This is very new to me, but I am familiar with other programming languages, and something this simple should not be difficult which leads me to think I'm missing something.

    Thanks in advance

    Chris

    It was easier to create a sample for you... Please see the attachment.  I think that's what you want.

    The code is on the change event of the DDList

    Paul

  • Anyone know the JavaScript to show/hide content based on the country field?

    Hi, I need to display a different number on a site according to the area of the country (com.au or co.nz). I figured out that the module {module_urlcountrycode} can be used to do this with javascript.

    Because I'm not exactly an ACE to js, is there anyone who could share the code?

    See you soon

    Jerun

    Place the module as a class-{module_urcountrycode} country, then you can simply the elements to give their own class and then you see depend on.

    . Country-nz .nzelement {display: block ;}}

    And by default all elements of the country have a class contryelement or something and all hidden by default.

  • Show/hide Post text element

    APEX 3.2

    Hello! I have a question on a form page for which I added Post text element. Basically, it's a clickable "email icon" next to the LOV, who should appear only when the LOV is set to "Qualified", otherwise it should be hidden. So far, it seems to work in Firefox very well, but does not at all in IE or Chrome. Any ideas?

    Name of goods: P206_SEV1_STATUS
    Point Type: Select the list
    Attributes of the HTML Form element: onchange = "toggleItem ('Sev1Mail'); »
    After the text of the element:
    <span id="Sev1Mail"><a href="javascript:popUp2('f?p=&APP_ID.:331:&APP_SESSION.::NO::P331_HIDDEN,P331_FROM_PAGE:&P206_ITEM_ID.,206',800,600);"<img src="#WORKSPACE_IMAGES#mail_16.gif" alt="Sev1 Email" title="Send Sev1 Email"></a></span>
    In the header HTML of the page, I've defined:
    <script type="text/javascript">
    <!-- 
    
    function toggleItem(pThis){
        var l_obj = document.getElementById(pThis);
    
        if ($v('P206_SEV1_STATUS') == 'Qualified'){       
               $x_Show(l_obj);
        }
        else{
            $x_Hide(l_obj);
        }
      return true;
    }
      
    //-->
    </script>
    Note: for some reason when I posted this thread, he removed href = 'javascript...' "in my Post above Text HTML element.

    Hello

    At least in post, you don't have good game HTML. You're missing > after a href tag
    I think it should be

    <span id="Sev1Mail"><a href="#"><img src="#WORKSPACE_IMAGES#mail_16.gif" alt="Sev1 Email" title="Send Sev1 Email" /></a></span>
    

    Also JavaScript can be a bit shorter as

    <script type="text/javascript">
    function toggleItem(pThis){
     if ($v('P206_SEV1_STATUS')=='Qualified'){
      $x_Show(pThis);
     }else{
      $x_Hide(pThis);
     }
    }
    </script>
    

    Kind regards
    Jari

  • show/hide a form of MEASURE

    has anyone successfully uses a script show/hide of any kind in a form of MEASURE?

    What I try to do is, I have Yes, and radio buttons.  If Yes is clicked, a text box appears in the line below.

    If no is clicked, no change occurs.

    I had one that worked, but now all of a sudden it no longer works.  What happens now when you get to the page, the text box that is supposed to be hidden, is visible.  However, when you click on no, it disappears, and if you click Yes, it reappears.

    Here's the code.  I think there must be a conflict between the JavaScript below and uninstall.  Any help is appreciated!  Thank you!

    < SCRIPT LANGUAGE = "JavaScript" >

    function showhide1 (id, str)
    {
    If (document.getElementById)
    {
    obj = document.getElementById (id);
    If (str == 'view') //obj.style.display = none
    {
    obj.style.Display = "";
    }
    ElseIf (str = 'none')
    {
    obj.style.display = 'none ';
    }
    }
    }

    < /script >

    < tr > < td align = "right" > anyone in your group will require translation to the Open House? < table > < td > < input type = "radio" name = value "translation" = 'Yes' onClick = "showhide1 ('display', 'show'); ' > Yes < input type = "radio" name = value "translation" = "" checked onClick = "showhide1 ('display', 'none'); ' > no < table > < /tr >

    < id tr = "View" > < td align = "right" > in what language? < table > < td > < font color = "red" > * < / police > < input type = "text" name = "language" > < table > < /tr >

    One of the reasons for the question text box suddenly stopped working during the loading of the page can be replace the css rule that affects visibility. There should be a rule in your css like tr #display file {display: none;}. In addition, you must change your javascript code, obj.style.display = "" to obj.style.display = 'block '.

  • Show hide columns generates error on the page if not found data

    Hello

    Has anyone ever encountered a situation where a page error when using the feature show hide column and no data is returned.

    My region to report is based on SQL and when calling at the start page or when restrictions are no match all all the data that appears is the message "No data found" by default. The method used, I pulled Carl Backstrom (RIP) application.

    < script type = "text/javascript" >
    function html_HideBasedOnCheckBox (pThis, pThat) {}
    if(pThis.Checked == true) {}
    html_ShowCellColumn (pThat);
    } else {}
    html_HideCellColumn (pThat);
    }
    }

    function getCellIndex (pRow, pCell) {}
    If (document.all) {}
    for (var i = 0; i < pRow.cells.length; i ++) {}
    If (pRow.cells [i] == pCell) {l_Count = i}
    }
    } else {}
    l_Count = pCell.cellIndex;
    }
    Return l_Count;
    }

    function html_HideCellColumn (pId) {}
    var l_Cell = $x (pId);
    var l_Table = html_CascadeUpTill (l_Cell, 'TABLE');
    var l_Rows = l_Table.rows;
    l_CellI = getCellIndex (l_Cell.parentNode, l_Cell);

    for (var i = 0; i < l_Rows.length - 1; i ++) {}
    html_HideElement (l_Rows.cells [l_CellI]);
    }
    return;
    }

    function html_ShowCellColumn (pId) {}
    var l_Cell = $x (pId);
    var l_Table = html_CascadeUpTill (l_Cell, 'TABLE');
    var l_Rows = l_Table.rows;
    l_CellI = getCellIndex (l_Cell.parentNode, l_Cell);

    for (var i = 0; i < l_Rows.length - 1; i ++) {}
    html_ShowElement (l_Rows [i]. Cells [l_CellI]);
    }
    return;
    }

    < /script >

    The attributes of HTML form elements is: onclick = "html_HideBasedOnCheckBox (this, this.value)" "

    The LoV for this box is static for a column.

    This set works very well if the data is returned. It must have something to do with the topics defined in the SQL code and therefore are not displayed when no data is returned. The code is then try to hide or something that does not exist.

    The part where he falls is during the setting of the variables:

    function html_HideCellColumn (pId) {}
    var l_Cell = $x (pId);
    var l_Table = html_CascadeUpTill (l_Cell, 'TABLE');
    var l_Rows = l_Table.rows;
    l_CellI = getCellIndex (l_Cell.parentNode, l_Cell);

    ... and more specifically the last variable setting: l_CellI = getCellIndex (l_Cell.parentNode, l_Cell);

    Does anyone know how I can get around this by using the method of SQL report i.e. Select col1 col2 "Column 1", "column 2" From myTable etc. or if it is possible to make up for it at the beginning that is

    If NO_DATA
    then
    dont_hide/display_any_columns that_dont_exist
    on the other
    var l_Cell = $x (pId);
    var l_Table = html_CascadeUpTill (l_Cell, 'TABLE');
    var l_Rows = l_Table.rows;
    l_CellI = getCellIndex (l_Cell.parentNode, l_Cell);

    for (var i = 0; i < l_Rows.length - 1; i ++) {}
    html_ShowElement (l_Rows [i]. Cells [l_CellI]);
    }
    return; ........

    ???

    See you soon,.

    Mike

    Hi Mike,.

    In fact, you can check the existence of the cell:

    var l_Cell = $x(pId);
    if (l_Cell)
    {
     rest of the code to hide the column
    }
    

    As long as l_Cell makes reference to a valid page element, then the if test passes and the rest of your code can work.

    Andy

  • Show/hide layers in PDF format on iOS

    Hi - I ask it just to see if there is perhaps a more modern response: is theer any (links, buttons, javascript) to show/hide layers or any content on an iOS device? Thank you!

    Hi patrickh20438662,

    If you are referring to the option on the iOS device, then I am sorry that there is no available option to show or hide layers on iOS device.

    Kind regards

    Meenakshi

  • Captivate use a Java plugin for browsers and what happens when Java is progressively to our on our LMS SCORM course?

    Hi, I work with an LMS (called clarity) and our supplier has indicated that when the Java Web browsers plugins are disabled or are more supported come September 2015 (I think they are referring to Chrome for September 2015) that the any of our courses created with Adobe Captivate does more work because they rely on Java to transfer information from the courses in the LMS. Is that correct, and how can this be addressed? We have hundreds of courses created with Adobe Captivate® 5 and up to 8 Captivate, accessible via Internet Explorer, most of the time. All courses are SCORM compatible (1.2 and 2004). Thank you!

    Captivate uses JavaScript, not Java. All of the tutorials use JavaScript to interface with the LMS because it is not dependent on server and maintains the shareable part of SCORM intact.

    No worries.

  • Show-hide sticky acts!

    By using the behavior show hide to reveal a series of images on our web page, and if you fly over the elements quickly skin doesn't seem to be able to do its job. Is this just an inherent problem with behavior? I have the page in test mode on. Mac. No links beyond this page are available, but maybe someone can give me a clue as to why this is happening. Its at http://homepage.mac.com/ibexcom/.public/samples_nsts.htm

    In this case, I write a little script that hides all layers. I have add this
    at each outbreak of layer to show before the behavior that shows the layer there
    supposed to.

    onMouseOver = "hideAllLayers (); MM_showHideLayers [...] »

    I think there is an extension to
    http://www.Projectseven.com
    makes this kind of layer management.

    --
    James M. Shook
    http://www.jshook.com

  • 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)

  • Show/hide text caption

    I want to hide a text caption when the user enters the screen but want to display when the user clicks on a box of click for the third time (maximum attempts). How can I do this? Advanced actions or JS. Help, please. *

    Hello and welcome to the forum,

    Possible with advanced actions, have several examples on my blog.

    This will be the workflow:

    1. Create a variable user v_counter, if the user cannot return to the slide, not need to initialize it when entering the slide, because if there is no initial value starts at 0
    2. Create the text of the legend TCWarning and set it to invisible in the properties panel
    3. create a conditional advanced action to be triggered by the success of the click box event; don't know what version of CP you use:
      1. increment the counter - CP5/5.5 in a simulated standard action that will be the first decision "Increment":

        • IF 1 is equal to 1
        • THEN Expression v_counter = v_counter + 1
      2. Check the value of the counter in a second decision 'Show '.
        • IF v_counter is equal to or greater than 3
        • SEE the TCWarning

    Lilybiri

Maybe you are looking for

  • Why the ads are not resolved?

    I disabled all add-ons, installed Adblock Plus, installed Malwarebyte s and nothing is removed from these ads. This problem appears only in Mozilla. You can see pictures, please help. Thank you.John

  • Office jet pro 8600 how default to black ink only when printing from my ipad

    Is it possible to set an option to print the black ink only when printing from my Ipad 2?When I use the print icon the only option that shows is double page. I would like to be able to print in black only.I can set this option when you print from my

  • Should I wipe before sending it to Orange?

    My camera has developed a fault (speaker of the inner ear does not), so I must refer to Orange, they said to keep the SIM card, battery, charger etc and I am having a new phone tomorrow. But if I remove my SIM card and switch on the phone can always

  • Change Date/Time (zone) on ACS5.1

    Would like to know where I can change the date/time (zone) within the ACS v5.1.  Change in the BIOS is not an option in area, just the time.  ACS then displays something completely different when starting.  Have not been able to find the settings for

  • Troubleshooting problem

    NOTE: I have Win7 Ultimate So what happened I tried to connect my iPad to my laptop but it wouldn't detect it. It would not show up in iTunes, it wouldn't charge, or anything else. I wanted to see if it was my iPad or my laptop, so I got my phone (i)