Check box or radio button to control image opacity and text field. javascript

This is a little over head and skill set so I am reaching out to you fine people.
I am using Adobe acrobat pro x
I have radio buttons now but I can switch to check box if needed.
What I need the Java script to do is...
If Yes is checked then a text field labeled comments appears and an image labeled box changes the opacity to 100%.
If No is checked then it does the opposite. Text field disappears and image goes to 0% opacity.

This is the Adobe Reader forum.  You are more likely to receive a helpful answer if you ask in the appropriate Acrobat forum (e.g. Acrobat SDK).

Similar Messages

  • Check box with Radio button functionality

    Hi All,
    I have a requirement like I need to have two check boxes on selection screen when ever I check one the other should be cleared with out pressing enter or any thing on selection screen just like radio button, all helpful answers are rewarded
    Thanks
    Giridhar

    Hi Karnam Giridhar,
    Try thee following code.
    PARAMETERS: test1 RADIOBUTTON GROUP sc1 DEFAULT 'X' user-command u1,
                test2 RADIOBUTTON GROUP sc1.
    PARAMETERS : p_file TYPE rlgrap-filename.
    AT SELECTION-SCREEN OUTPUT.
    if test2 is initial.
      loop at screen.
        if screen-name EQ 'P_FILE'.
             P_FILE  = ''.
             screen-input = '0'.
             modify screen.
        endif.
      endloop.
    endif.
    AT selection-screen.
    if not test2 is initial.
      loop at screen.
        if screen-name EQ 'P_FILE'.
          if screen-input eq '0'.
            screen-input = '1'.
            modify screen.
          endif.
        endif.
      endloop.
    endif.
    Regards
    Raj

  • Need Help: I need a check box to auto fill a set value in separate text field.

    Hi, this is my first time with inserting scripts into a PDF Form.
    We have a form that requires the user to check a box regarding medical conditions they have (i.e. Asthma, Diabetes, Hypertension).  Later in the form, they have to type out the same condition into a text box. (I know stupid to double document, but it is required).  Is there a script that will auto fill the text box when they check the box?  For example, if they check asthma, the text box on a later page in the PDF will say "Asthma, controlled."  Is this possible?
    In addition, if they don't click Asthma, and do click Diabetes, could it add Diabetes to the first text box, but if they check both, it would add Asthma to box 1 and Diabetes to box 2?
    Any help would be GREATLY appreciated.
    I'm using Acrobat 9
    Thanks!

    Hi, I'm staring at the code trying to make it work for my needs, which are similar to Austin's.
    I have a 16-page form with 2,988 checkboxes in the entire document (a little over 200 in each page besides the first and last page). The last page contains a textbox labled Summary, and it should provide a summary of all the items checked in the document. Theoretically only one page will be populated at a time, so there will be no more than 200 checkboxes checked in the entire document.
    Is it possible to use the same code? And do I just put the code under the text in the script that reads:
    form1.SummaryPage.SummaryText::calculate - (JavaScript, client)
    The JS I am trying to get to work is the following from a post above.
    // Custom Calculate script
    (function () {
        var i, v, s = "";
        // Loop through the 2988 check boxes
        for (i = 1; i < 2989; i += 1) {
            // Get the value of the current checkbox
            v = getField("checkbox " + i).valueAsString;
            // Concatenate check box value to string if not deselected
            if (v !== "Off") s+= v + "\r";
        // Set this field value
        event.value = s;

  • Only one check box or radio box

    I'm sorry i can't find this answer anywhere.
    If i want to ask a question in a form and provide two oppositie responses (Yes or No) using check boxes or radio buttons, how exactly do I do that? I saw various people referring to 'java' i have no idea where to put that or what java is required. I need specific answers please? Obviously in this case i need only one of the check boxes or radio buttons to be selected, i can't allow both to be selected.
    Your assistance is greatly appreciated

    Why use a checkbox?  Put radiobuttons on the form, you can set the button style to checkmark and they will be mutually exclusive.

  • Right-click doesn't work on select boxes, checkboxes & radio buttons. On other elements, there's no"Inspect Element" option

    After installing FF 6.0, right-click doesn't work on select boxes, checkboxes & radio buttons, i.e. nothing happens on right-clicking.
    The context-menu is available on other elements, but there's no"Inspect Element" option in the context-menu

    Regarding the two-button click: just go to the "Sytem Preferences --> Mouse" pop-op and under "One Finger", check the "Secondary Click" box.  Problem solved.  I don't know how I missed this the first 3 times I went to there.    Oh well.
    And as for why I had to change the Trackpad settings to get the Magic Mouse zoom feature to work (see original question): I'm still stumped.   Your guess is as good as mine.
    Hope this helps!
    Steve

  • One pair of radio buttons to control multiple text objects - Designer 8.0

    Greetings - a big thank you in advance for any assistance. I have often found answers to my problems on this forum, but have been unable to find an answer to the following.
    The short of it - is it possible to make a pair of radio buttons control the visibility of multiple text objects with the same name(I have had success in manipulating only a single text object with one pair of buttons)?
    The long of it - I am trying to make a form bilingual based on the value of a radio button group to control the visibility of the text object in the selected language. When the user selects the language they wish to see, all the text objects in the form switch to that language. I am working with a dynamic PDF.
    I have succeeded to a very limited extent in manipulating one text object by overlaying text objects in both languages, setting one object to "invisible" as default, and controlling that text objects visibility with the following JavaScript in the click event of the radio button group:
    ----- form1.#subform[0].ENG_JPN::click: - (JavaScript, client) -------------------------------------
    if (ENG_JPN.rawValue == 1)///1 equals the value of on
    {English.presence = "visible";}
    else
    {English.presence = "invisible";}
    if (ENG_JPN.rawValue == 2)///2 equals the value of on
    {Japanese.presence = "visible";}
    else
    {Japanese.presence = "invisible";}
    endif
    The problem is I need to manipulate the visibility of all text objects with the same name on the form with a single radio button group. I have tried writing the code as one does for the sum of a repeating field, ie. English[*].presence etc. however I get a C++ error in preview.
    Any ideas are greatly appreciated. I am truly stumped - thank you for your time.

    To access objects with the same name you need to deal with occurance numbers. If your object is called TextField then the 1st occurance will be TextField[0], the second occurance will be TextField[1] etc.....
    The issue is that the [] in javascript are interpretted as an array element so you have to use the syntax: xfa.reolveNode("string") to get to your object names. In your case you would use:
    xfa.resolveNode("TextField[1]").presence = "visible"
    This string syntax allows you to use a var to hold the index number and is very useful with for loops where you want to set large numbers of objects. So if the index was held in the var i then your syntax would be:
    xfa.resolveNode("TextField[" + i + "]").presence = "visible"
    If the objects are in a repeating subform then the occurance numbers are on the subform and not the object. You can always get the expression to use by app.alert(objectname.somExpression). This will return the expression that you need to create.
    Make sense?

  • I updated my iOS to 7 yesterday. But my music app doesn't show the 'Radio' button as the online videos and Apple website claims. What could be the reason and how to fix it. All other apps, swipe up/down seem to be working fine.

    I updated my iOS to 7 yesterday. But my music app doesn't show the 'Radio' button as the online videos and Apple website claims. What could be the reason and how to fix it. All other apps, swipe up/down seem to be working fine.

    Try to connect in recovery mode, explained in this article:
    iOS: Unable to update or restore
    Before that, back up your device, explained here:
    iOS: Back up and restore your iOS device with iCloud or iTunes
    How to back up your data and set up as a new device
    You can check your warranty status here:
    https://selfsolve.apple.com/agreementWarrantyDynamic.do

  • I have a dynamic table that calculates the sum of all rows, no issue.  I'm struggling with pulling out a subtotal though.  I would like to have a check box in each row  that flags those rows and gives the sum of their total.  Any help would be greatly app

    I have a dynamic table that calculates the sum of all rows, no issue.  I'm struggling with pulling out a subtotal though.  I would like to have a check box in each row  that flags those rows and gives the sum of their total.  Any help would be greatly appreciated.

    Here's something I threw together rq. The script is in the change event for the checkbox in the table. (Of course, you'll have to modify it to suit the names of your fields.)
    var rows = xfa.resolveNodes("tblAmounts.Row1[*]");
    var subtotal=0;
    for (i=0; i<rows.length; i++) if (rows.item(i).cbAdd.rawValue == 1) subtotal = subtotal + rows.item(i).nfAmount.rawValue;
    nfSubtotal.rawVlaue=subtotal;

  • I don't seem to have an align/unalign check box option anymore for tools like the clone and healing brush. PS CC14 on a Mac. Anyone know how to get it back?

    I don't seem to have an align/unalign check box option anymore for tools like the clone and healing brush. PS CC14 Anyone know how to get it back?

    Sounds like you have the Narrow Options Bar enabled
    Photoshop>Preferences>Interface

  • Share Image,Link and Text to Social Networking App from My Windows Phone App

    Hi,
    I am developing windows phone 8.1 silverlight app where I want to share Images,Links and text to Social Networking App Like Facebook,Twitter,Whatsapp and Instragram.
    In Share content contains A Image of App Icon, A Link of App website and I invitation Text.
    There are Five buttons
    Share by Email
    Share by Facebook
    Share by Twitter
    Share by Whatsapp
    Share by Instragram
    Problems which I faced
    I can not attached image to Email. How it is Possible.?
    I can only open whatsapp from my App. But can not share to this
    I have used Share task but in list of app there is no whatsapp and instragram app ( I know there is no official app for instragram but it is Instragram Beta app)
    Please guide me how can I share my content to all above app

    Please see this sample application:
    https://code.msdn.microsoft.com/windowsapps/Sharing-Content-Source-App-d9bffd84
    You cannot control what appears in the share UI.  The Share UI Will show all applications that have registered to receive the type of content you are sharing.  So if a particular application is not appearing, then it is not registered as a Share
    target for that content type.
    I would run the sample on your phone for the various content types.  it should give you a good idea of which apps are registered for which content type.
    Bret Bentzinger (MSFT) @awehellyeah

  • How to populate image and text field in SQL Server

    I want to populate a table, i.e insert images in a table in SQL Server. I am using Java(JSP/Servlet). Can any one suggest me how to populate the image and text fields in SQL Server...of course, using Java. If possible, could you please give me a piece of code?
    Regards -
    Samit

    Hi,
    Please check the following link for information on inserting images in to sql server database.
    http://www.databasejournal.com/features/mssql/article.php/1475641
    Cheers,
    vidyut

  • Need to make a 20 second HD clip with a moving image background and text thats flies in...

    Hi all im quite new to after effects and need to make a 20 second HD clip with a moving image background and text thats flies in. I also need to create a basic cross image. If anyone could suggest the best way to go about doing this it would be greatly appreciated. Thank you in advance

    Thank you for both of your reponses and I will try and be clearer:
    what I want to acheive is a HD motion graphic of text which will almost spin onto the screen letter my letter and then a become static word. Behind this I would like to place a moving image clip.
    By 'basic cross image' what im looking to do is use a cruifix shape instead of a 't' on the text.
    I hope this makes sense and thanks again!

  • When I click the iCloud button I get a browser with check boxes, not slider buttons and it does not have a "backup and storage" button.  So I cannot set up backup.

    When I open my iCloud browser it looks different than "normal." It shows the list with check boxes, not slider on-off buttons.  It dos not show a "storage and backup" button so I cannot set up my backup. What is wrong?

    If see something like the image below it's because you are looking at the iCloud settings on your Mac, not on an iOS device (which has sliders).  Storage & Backup isn't in the Mac settings because you cannot back up your Mac to iCloud.  Only iOS devices can back up to iCloud.  On a Mac, you can get information about your iCloud account storage by looking at the green usage bar at the bottom and by clicking the "Manage..." button on the bottom right.

  • How to check the default checked  value for radio button on jsp for struts

    Hello , I just want to check the default checked value in JSP for a radio button, how can i do that?
    <html:radio property="sale" value="permanent" style="vertical-align: middle;">Permanent</html:radio>
    <html:radio property="sale" value="temporary" style="vertical-align: middle;">Temporary</html:radio>

    you can set the default value for property ( which you want to default selected when the form is first loaded) in reset method of the form.
    <html:radio property="sale" value="permanent" style="vertical-align: middle;">Permanent</html:radio>
    <html:radio property="sale" value="temporary" style="vertical-align: middle;">Temporary</html:radio>
    In the above case you can write the code as follows in the perticular form of this jsp.
    public void reset(ActionMapping mapping, HttpServletRequest request) {
    super.reset(mapping, request);
         sale = "permanent";
    This will show the first check box default selected when the first time the page is loaded.

  • How to add check box in SAP B1 grid controls..

    hi all,
    Anyone know how to add check box in SAP grid control?
    It will be great if you could show me some sample code.
    thanks.
    regards,
    sohch

    Hi Sohch,
    1. First of all you should define the Column in a matrix as it_CHECK_BOX. Like
            oColumns = oMatrix.Columns
            oColumn = oColumns.Add("chk_YesNo", SAPbouiCOM.BoFormItemTypes.it_CHECK_BOX)
            oColumn.TitleObject.Caption = "YesNo"
            oColumn.Width = 60
            oColumn.Editable = True
    2. Bind it with a DBDataSource as defined
            oColumn = oColumns.Item("chk_YesNo")
            oColumn.DataBind.Bind("UDTable", "U_YesNo")
    3. Make Sure that the value that is being put into the Database is either 'Y' or 'N'.
    Hope this Helps
    Rizwan Hafeez
    Team Lead
    SAP Addon Development Section
    Abacus Consulting - Pakistan

Maybe you are looking for

  • Not validating against LOV if the field is not null

    hi all, i am using form6i. i have two fields called p_code,p_doc. p_code is optional and p_doc is mandatory. Both the fields is having LOV. Based on the p_code, p_doc should be filtered. both fileds i have given validate_from_list true. if user enter

  • Using VBA to generate varibale worksheets in BEx Report

    Hi Gurus, i got an BEx Analyzer report (BW 3.5) in Excel. It shows all orders generated by the customers. In the table we can see the customer number, customer name, some attributes and the sales key figures. For Example: 10000, Peter, ..............

  • Open Universal worklist directly through link in mail

    Hi, I have a requirement where the approver will receive a mail notification of the task assigned to him by a requester. The mail should contain a URL which should directly open the UWL page(containing task) without asking for login/password. If i di

  • Trouble importing art works

    Hello all. I am having trouble with an artwork which I have been trying to work with after importing it to Flash. The file has been saved as JPEG, PSD, TIFF, and PNG files, but all of those times, the art work comes out just as a block of red. When i

  • Application can't use mutiple custom error files?

    I have problems getting custom error files to work in a stand-alone application. For different components of my program, I have different custom error files:   Micro4-errors.txt   Isabel-errors.txt   Triggering-errors.txt Running in the Labview ADE e