Add JavaScript to boxes and buttons

This question was posted in response to the following article: http://help.adobe.com/en_US/captivate/cp/using/WS5b3ccc516d4fbf351e63e3d119e9581edd-7feb.h tml

This article is talking about a click box object in Captivate, not a text caption. Clickboxes and buttons in Cp are interactive objects that can be used to trigger Advanced Actions, one of which is to execute JavaScript code.
You CAN make a text caption clickable by attaching an Event Handler widget to it.  This effectively turns the text caption into an interactive object capable of executing Advanced Actions in response to mouse events.  However, there is no Advanced Action that will turn your text caption into a scrolling caption.

Similar Messages

  • Problem with action script 3 make input text box and button....

    Hi every one I am trying to make a family book using "Air for Android" with a simple search engin in the book
    air for android only work with AS3,
    the search function is to type a person's name and hit submit then go to a specific frame.
    have a problem making below code to work in AS3 and hopefully one of you guys can lead me in the right direction to fix the issue.
    Currently, I have an input text box and a button. When you type specific words into the input box and then hit the button it sends you to a specific frame.
    (it work find in AS2 but not in AS3,)
    Here is my current code that is placed on the main timeline, first frame:
    stop();
    onEnterFrame = function () {
        submit.onRelease = function() {
            switch (yourname.text) {
            case "name1" :
                gotoAndStop(2);
                break;
            case "name2" :
                gotoAndStop(3);
                break;
    My button that checks if the phrase is correct is called "submit" and my input box has an instance of "yourname".
    My phrases that will be accepted in the input box are "name1" and "name2" which bring me to two different frames.
    Basically, I'm having a problem with making this to work with AS3.

    you should use the default option in the switch statement
    that way yourname contains something not in one of the case statements it will go to the default bit and execute teh code there
    function onSubmit(e:MouseEvent):void
                                  switch (yourname.text)
                                            case "name1":
                                                      gotoAndStop(2);
                                                      break;
                                            case "name2":
                                                      gotoAndStop(3);
                                                      break;
                                            default:
                                                      goToAndStop(you frame you want);
                                            break;

  • Button, Javascript Confirm Box and Process

    I have a button on a page. When someone click on the button, depends on the value on a item, if it's not null, then pop up a confirmation box, if the item is null, the call a process directly. If the confimation is true, then call the same process, otherwise page won't be to submitted.
    I' m still on version 1.6.
    Anyone could give me some help?
    million thanks!
    Ran

    Thans for the reply.
    Here is what I did:
    I created another item called itemB. And put a javascript function on the HTML Header. And put a image button and use onclick to trigger the function. Based on the confirm is true or false, the javascript will set the itemB to two different values. And the process will run based on the value of the itemB. It seems to work sometimes, but not always. I don't know if I am missing anything or maybe it's not a right way to do it. Could someone take a look for me. Here is the javascipt.
    <script language="JavaScript" type="text/javascript">
    function checkMissing(formItem,formItem2)
    var t1 = document.getElementById(formItem).value;
    if (t1 != null)
      conmod = confirm("There is/missing parts, Do you wnat to continue to close the seesion?");
      if (conmod == true)
       document.getElementById(formItem2).value = "CLOSE";
       doSubmit();
      else if (conmod == false)
        document.getElementById(formItem2).value = 0;
      else
       document.getElementById(formItem2).value = "CLOSE";
       doSubmit();
    </script>

  • Newb deserving assistance with Adobe Javascript (check boxes and combo boxes)

    Hi, I'm a newb when it comes to javascript (using adobe acrobat pro 6.0).
    I am working on a form that will allow me to autofill checkboxes based off of information chosen. Ideally, I would like to have a selection from a combo box autofill/auto checkmark check boxes. Alternatively, I would be willing to just have different selections presented with check boxes that when filled, would auto checkmark other check boxes (I know how to do this one, but I am not sure how to clear the check boxes if the initial one is unchecked).
    I have the action button tied to the mouse up function. This just errors out.
    var Citrix = this.getField("Citrix")
    var Appro = this.getField("Appro")
    var SAS = this.getField("SAS")
    if (event.target.value=="Yes") {
    Citrix.checkThisBox = true
    Appro.checkThisBox = true
    SAS.checkThisBox = true
    else {
    Citrix.checkThisBox = false
    Appro.checkThisBox = false
    SAS.checkThisBox = false
    I have this that works, but I don't know how to clear the buttons when "Associate" is unchecked.
    if(this.getField("Associate").isBoxChecked(0));
    this.getField("Citrix").checkThisBox(0, true);
    this.getField("Appro").checkThisBox(0, true);
    this.getField("SAS").checkThisBox(0, true);
    The other way I was working on it, was to use a combo box to autofill/checkmark check boxes. But this code doesn't work either.
    function calculateTextField()
    // get the value of the combo box
    var comboValue = this.getField("Select").value;
    // get the state of the checkbox
    var isChecked = (this.getField("Citrix").value == "Yes");
    var textFieldValue = "";
    console.println(comboValue);
    if (isChecked)
    if (comboValue == 0)
    textFieldValue = "";
    if (comboValue == "Associate")
    (this.getField("Citrix").value == "Yes");
    else if (comboValue == "Specialist")
    (this.getField("Citrix").value == "Yes");
    else if (comboValue == "Team Leader")
    (this.getField("Citrix").value == "No");
    else
    (this.getField("Citrix").value == "No");
    else
    textFieldValue = "";
    this.getField("Select").value = textFieldValue;
    Can anyone please assist me with this?
    Thanks,
    Chris

    Hi Gene,
    Thank you for the response. Are you saying that my initial formula should look more like this; ?
    var Citrix = this.getField("Citrix")
    var Appro = this.getField("Appro")
    var SAS = this.getField("SAS")
    if (event.target.value=="Yes") {
    Citrix.checkThisBox = true
    Appro.checkThisBox = true
    SAS.checkThisBox = true
    else {
    if (event.target.value=="Off")
    Citrix.checkThisBox = true
    Appro.checkThisBox = true
    SAS.checkThisBox = true
    Thanks,
    Chris

  • How do i add a signature box and a picture box for a custom form?

    Creating a form (first time) and want to add a box for a signature and one for a picture. I do not want to insert the picture now just create the space for it. Can anyone advise???

    Hi;
    Signatures are not supported in FormsCentral.  The image upload is, here is a Tutorial on the "Attachment" field in FormsCentral: http://forums.adobe.com/docs/DOC-2656
    Thanks,
    Josh

  • Click boxes and buttons not working in Captivate 3 published projects

    I really, really, hope that someone can help me...
    we are migrating from Centra/Saba LMS to Connect Pro LMS and while taking our "old" SCORM projects and posting them to the Connect Pro server we have encountered an issue...and the reason it's very hard to trouble shoot is that it's not all of the projects....??
    Once a project is pulished none of the buttons or click boxes are working - for instance we use a play button on the frist slide for students to enter the course - you click it nothing happens (except when you mouse over the button it does change color)...same with the click boxes - I can use the progress bar to move froward but anything I click just doesn't respond...
    Has anyone encountered this? and I hope know something we can do?
    THANKS SO MUCH,
    Jen

    Do your published projects work outside of your LMS?
    Or is it just inside the new LMS that it isn't working?
    Usually buttons and click boxes not working is because your slides are pausing before the button becomes active.
    What version of Captivate and Flash are you using?

  • ALV with check boxs and buttons

    Hi guys,
    It's been a while since last time I used ALV and its options.
    I have a requirement to show many records in ALV format. each record starts with a check box, user can choose which record by checking each and click on a button to merge them (those record contain text). Everything should show up on ALV screen. Any idea what how should I do that??
    I think I should use screen painter but I have no idea how to implement that...
    Thanks,

    Hi Ben,
    Here is the code as per ur requirement ..
    just go through this....i hope u will get some help...
    REPORT zashu_alv_in_popup_mara.
    TYPE-POOLS : slis.
    *Data Declaration
    DATA:i_repid LIKE sy-repid.
         i_repid = sy-repid.
    Declaration for ALV
    DATA: wa_fcat TYPE slis_fieldcat_alv,
          fcat TYPE slis_t_fieldcat_alv,
          wa_fcat1 TYPE slis_fieldcat_alv,
          fcat1 TYPE slis_t_fieldcat_alv.
    *Types Declaration
    TYPES:BEGIN OF ty_mat,
           matnr TYPE mara-matnr,
           checkbox(1),
          END OF ty_mat.
    TYPES:BEGIN OF ty_makt,
           matnr TYPE mara-matnr,
           maktg  TYPE makt-maktg,
           maktx  TYPE makt-maktx,
          END OF ty_makt.
    *Internal table Declaration
    DATA:it_mat TYPE TABLE OF ty_mat WITH HEADER LINE.
    DATA:it_makt TYPE TABLE OF ty_makt WITH HEADER LINE.
    *Range Declaration
    RANGES : r_matnr FOR mara-matnr.
    *Start of Selecdtion
    START-OF-SELECTION.
      PERFORM get_data.
      PERFORM display_data.
      PERFORM display_alv.
         Form  get_data
    FORM get_data.
    Read material from MARA
      SELECT matnr FROM mara INTO TABLE it_mat.
    ENDFORM.                               " GET_DATA
         Form  display_data
    FORM display_data.
      wa_fcat-row_pos   = '1'.
      wa_fcat-col_pos   = '1'.
      wa_fcat-fieldname = 'CHECKBOX'.
      wa_fcat-tabname   = 'IT_MAT'.
      wa_fcat-seltext_m = 'SELECT'.
      APPEND wa_fcat TO fcat.
      CLEAR wa_fcat.
      wa_fcat-row_pos   = '1'.
      wa_fcat-col_pos   = '2'.
      wa_fcat-fieldname = 'MATNR'.
      wa_fcat-tabname   = 'IT_MAT'.
      wa_fcat-seltext_m = 'MATERIAL'.
      wa_fcat-outputlen = 50.
      APPEND wa_fcat TO fcat.
    Display data in a POPUP
      CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
           EXPORTING
                i_selection          = 'X'
                i_zebra              = 'X'
                it_fieldcat          = fcat
                i_tabname            = 'IT_MAT'
                 i_checkbox_fieldname = 'CHECKBOX'
           TABLES
                t_outtab             = it_mat.
    IF NOT it_mat[] IS INITIAL.
    LOOP AT it_mat  WHERE checkbox = 'X'.
            r_matnr-sign = 'I'.
            r_matnr-option = 'EQ'.
            r_matnr-low = it_mat-matnr.
            r_matnr-high = ' '  .
            APPEND r_matnr.
            CLEAR r_matnr.
          ENDLOOP.
        ENDIF.
    select matnr maktx maktg from makt  into table it_makt where matnr in
    r_matnr.
    ENDFORM.                               " DISPLAY_DATA
    *&      Form  DISPLAY_ALV
          text
    -->  p1        text
    <--  p2        text
    FORM display_alv .
    *ALV Display in a POPUP window
      wa_fcat1-row_pos   = '1'.
      wa_fcat1-col_pos   = '1'.
      wa_fcat1-fieldname = 'MATNR'.
      wa_fcat1-tabname   = 'IT_MAKT'.
      wa_fcat1-seltext_m = 'Material No'.
      APPEND wa_fcat1 TO fcat1.
      CLEAR wa_fcat.
      wa_fcat1-row_pos   = '1'.
      wa_fcat1-col_pos   = '2'.
      wa_fcat1-fieldname = 'MAKTX'.
      wa_fcat1-tabname   = 'IT_MAKT'.
      wa_fcat1-seltext_m = 'DESCRIPTION'.
      APPEND wa_fcat1 TO fcat1.
      wa_fcat1-row_pos   = '1'.
      wa_fcat1-col_pos   = '3'.
      wa_fcat1-fieldname = 'MAKTG'.
      wa_fcat1-tabname   = 'IT_MAKT'.
      wa_fcat1-seltext_m = 'GROUP'.
      APPEND wa_fcat1 TO fcat1.
      CLEAR wa_fcat1.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         i_callback_program                = i_repid
         i_grid_title                      = 'Material Description'
         it_fieldcat                       = fcat1
      I_SCREEN_START_COLUMN             = 30
      I_SCREEN_START_LINE               = 10
      I_SCREEN_END_COLUMN               = 70
      I_SCREEN_END_LINE                 = 30
        TABLES
          t_outtab                        = it_makt
    EXCEPTIONS
       PROGRAM_ERROR                     = 1
       OTHERS                            = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " DISPLAY_ALV
    Thanks & Regards
    Ashu SIngh

  • Print widget makes answer box and buttons disappear when clicked

    I've tried two print widgets so far
    1. the widget that comes standard with Captivate 4 and
    2. the one posted here http://forums.adobe.com/message/1937195 by a community member.
    Issues:
    1. standard print widget - once the user has typed in their answer (on a short answer question slide) and presses the print widget icon the preview bar shows up and makes the answer box disappear as well as the buttons on the page. So yes, they can print that slide but then there's no way for them to move forward to the next question, answer it and print again etc.
    2. the print widget created by the community member in the thread linked above makes the answer box disappear entirely. The user can't even answer the question.
    In both instances I can't "bring to front" because they're placed on question slides and the option is greyed out. I don't know what to do at this point but I REALLY REALLY need the print function to work for these courses.
    any help would be greatly appreciated.
    Thanks,
    Aarti

    For anyone who is having the same problem the issue has been resolved here: http://forums.adobe.com/message/1971043
    Thank you Sikandar!

  • How to delete an xml list from the data grid using the check box and button

    i am using an XMLList as the dataprovider for the dataGrid,
    there i have a checkbox for each row, i need to delete the row for
    which the checkbox is selected with the help of a delete
    button.

    Your checkbox must update a property of the dataProvider when
    checked. You can then loop through the XMLList, checking that
    property. when you find it use the "delete" operator on the found
    node.
    Tracy

  • Captivate 4 crashes when I try to add a click box to a slide

    I know this is not an advanced functionality but it's certainly an agressive bug. I have created several movies using the Clickbox button to add boxes to my slides with no problem, but I have one Captive 4 file that crashes every time I click on the Clickbox tool or try to paste a Clickbox from another movie. The problem file was created in the same resolution and using the same techniques as the non-problematic files. Any ideas as to what could be causing this or am I stuck with a corrupt file I need to reshoot?
    Thanks!
    Joyce

    Hi there
    It could be that your project has become corrupt. In that case you might be able to recover by opening a second instance of Captivate and creating a new blank project using the same resolution as the problem one. Then copy slides from the problem project and pasting into the new blank one.
    Just a side note. You seem to be confusing Click Boxes and Buttons. These are two distinctly different objects. Click Boxes operate nearly the same way as Buttons. They are invisible by their very nature.
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcererStone Blog
    Captivate eBooks

  • I am web developer and I found that safari latest version 8.0 donot support tabindex for input type radio, checkbox and button.,

    Hi,
    I am using safari 8.0 on latest mac system. I am web developer. My website do not support keyboard tab button for some of html controls for safari  8.0. I have apply  tab index for these controls( input type="radio" ,check box and button tag).
    Please help me to resolve this problem.
    Thanks

    Post a link to your webform with these controls
    I am unable to test on Safari 8.x, but have you tried changing the UserAgent from the Developers Tools menu? My UserAgentSwitcher for Firefox only goes up to 7.xx Mavericks, but Safari's should be backwards 'compatible' a very long way.
    I am unsure whether you cannot TAB between these controls (normal browser behavior) or whether you have some special code that "SELECTS" each control as you go through them? The latter seems unworkable for any scenario I can imagine - if I want to select something I have brought into focus, the normal action would be to press the ENTER key while control or link is focused, then TAB on through choices to the next selection to be made
    Please clarify what exactly the problem is (for *me* at least)
    ÇÇÇ

  • Add javascript to Out of the box Modal Dialogue Box in Sharepoint 2010.

    Hi,
    We have Sharepoint and Project Server 2010 SP-2 enviroment. We are using Project Server Timesheet for our managing Time logging.
    Project Server 2010 has "Add existing task" Modal Dialogue box in which I want to add "Javascript" code in order to sort the Project Server Timesheet Line Claasification listbox control in Ascending order.
    As you can see from below screenshot "Standard" the Out of the box timesheet line classification is coming at top and then our custom line classification coming.
    But I want to sort this list in ascending order so that this "Standard line classification can come at the bottom of the listbox control.
    Please suggest me how can I achieve this.
    Thanks much !!!
    Sachin Vashishth MCTS

    Thanks SaiRam from input, I can get JQuery for sorting the control over the internet no issue. I have to pass the ControlId in J-Query to sor the items in that control and I am not able to get the control id as it;s modalk dialogue box.
    Can you please explain further here, also let me know in case I am wrong in my understanding.
    Thanks !!!
    Sachin Vashishth MCTS

  • Check Boxes and Javascripts

    I have a form where there is a table, and inside the table is a row for a Check box for “Sub to Sub”, a row for Work performed by Sub-Contractor Description, a row for Original $$ Amount, and a row for Final $$ Amount Paid.  The Original Amount and Final Amount Paid totals up at the bottom of the page. 
    The user would like to have it set that if the Sub-Contractor selects a check box under “Sub to Sub” row, the dollar amount that is entered for the Original Amount and Final Amount Paid for that row does not add into the Total amounts at the bottom of the page. 
    Is it possible to write a Javascript for this and if so, what would it be?

    Okay.  I put it in the first calculated script which is the total for Original Amount (OA1).  The checkboxes are named Checkbox1.1, Checkbox1.2, etc. But it's not calculating at all.  Any suggestions?
    (function () {
        var f1 = this.getField("OA1");                            
        var a1 = f1.getArray();
        // Get the "Sub to Sub" check boxes
        var a2 = getField("CheckBox1").getArray();
        var sum = 0;
        for (i = 0; i < a1.length; i++) {
            // Only add the value if the check box is not selected
            if (a2[i].value === "Off") {
                sum += +a1[i].value;
        if (sum != 0) {
            event.value = sum;
        } else {
            event.value = ""
    Thanks
    Connie

  • Everytime i try to add a text box the program crashes.  Why and how do I fix it?

    Since I purchased and installed Adobe Photoshop Elements every time I try to add a text box the program crashes.  Why and how do I fix it?

    TeeKnows wrote:
    Debit cards are accepted in the iTunes store.
    No longer accepted for NEW accounts, however if a debit card were associated with the account BEFORE this change, they can still be used.

  • How to add a single check box and a label to a image in Muse?

    Hello!
    I need help with adding a check box with a label to the right of it. I know about the forms, and how you can add a check box there but i don't need all the other form options.

    Hi
    It is not possible to use only checkbox from a form at the moment. An alternate way could be inserting it using html, something like below
    <input type="checkbox" name="Muse" value="Muse"> A sample checkbox<br>
    I am not sure what exactly you are trying to achieve, but this will work  with Form tag only, like in the example here
    Tryit Editor v2.5
    Do let me know if you have any question.

Maybe you are looking for

  • VENDOR TOTAL BALANCE

    Hi all, Please advise if there is a table that will only show the TOTAL BALANCE of the vendor? without the vendor line items. Many thanks in advance =)

  • Accordion tabs need to stay open

    I'm using an accordion widget for my navigation area at my wife's site, paxbaby.com. I would like to set the javascript so that instead of defaulting to all-panels-closed on each loaded page, it rather keeps open the panel that was open on the previo

  • Data from 2 database blocks insert into the same base table?

    Hello, I have canvas C_NEW. On this canvas, items from 3 blocks are usable by the user. 1. Block NEW_HEAD: 3 items say X1,X2,X3 2. Block NEW : multi record text fields say Y1 thru Y10. Also a scrollbar. 3. Block NEW_ACTION: 6 buttons say B1 thru B6 (

  • Attribute Change Run taking very Long time.

    Hi Experts: We are daily loading Master data from one common process chain. There are 33 Infoobjects which are getting activated in Attribute Change Run Process. This process is taking almost 3 hours to run daily; due to this it is impacting our othe

  • What will be physical architecture for SSAS Tabular model with Sharepoint 2013?

    I would like to build SharePoint 2013 based reporting portal with Power View as visualization tool. I have 300-800 million rows and customer puts priorities in high performance. Data source is SQL Server database and Flat Files. What will be recommen