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

Similar Messages

  • Popup screen with two check box and a text area for the user to enter value

    hi,
    i have a requirement when a button is clicked a popup screen should appear with two check box and a text box where the user can enter a value.
    is there any function module which has that functionality

    Hello,
    You can create a new screen and select the screen type as <b>model dialog box</b>.This will give you a<b> pop-up screen</b> and you can call this model dialog box screen in the PAI of the screen where the button is present.(At user-command).
    <b>case ok_code.
    when 'BUTTON'.
    call screen 200 starting at 10 10.</b>
    You can design the PBO of this pop-up screen as per your needs.
    Regards,
    Beejal
    **Reward if this helps.

  • How to put Check Boxes and Radio button in Smartforms

    Hi all,
    How to put check Box and radio button in Smartforms ............ from web properties there is an option to use. But How to use.     
    regards,
    Mohsin

    u can declare the checkboxes or radiobuttons whatever in driver program and pass the same to ur form...

  • How to create the Check box and Text Area inside the Assignment block

    Dear all,
            I am new to web UI development. my requirement is to create the Check box and Text box in the Assignment block. Can anyone help me to do this requirement.
    Thanks & Regards,
    Ashok.

    Hi,
      Please place the below code in the GET_P methods of the fields.
      For Text Area 
    CASE iv_property.
        WHEN if_bsp_wd_model_setter_getter=>fp_fieldtype.
          rv_value = cl_bsp_dlc_view_descriptor=>field_type_textarea.
      ENDCASE.
    For Check Box 
    CASE iv_property.
        WHEN if_bsp_wd_model_setter_getter=>fp_fieldtype.
          rv_value = cl_bsp_dlc_view_descriptor=>field_type_checkbox.
      ENDCASE.
    Regards,
    Lakshmi.Y

  • Livecycle: Can you click a check box and have it copy the entire field to a new location?

    I have a check box and I want to check the box and have field 1a, field 1b, field 1c be copied to location on a third page.
    These are patient goals: and those goals need to be recognized later on while trying to fill out paperwork, but I don't want to have to look back at the front page. so I want to pick which goals I want to see at a later page and have the goal  (field) and the field content that was chosen on the first page show up.
    I will choose three to five goals and I want them lined up
    field 1a, field 1b, field 1c then underneath
    field 2a, field 2b, field 2 c etc.
    THanks for the help
    CHeers

    The attachment functionality in this forum keeps fluctuating ....if you do not see an add attachmnet button on your post then email it me instead at [email protected]
    Paul

  • Problem getting check boxes and radio button to click with applescript

    This is my script, it runs through without error, i can see the check box lightly flash like its being focused in on, but it wont actually check mark the box. it does this with all my check boxes and radio buttons.
    tell application "Adobe InDesign CS3"
    activate
    end tell
    tell application "System Events"
    tell process "InDesign"
    tell menu bar 1
    click menu bar item 12
    key code 125
    key code 125
    key code 124
    key code 125
    key code 125
    key code 36
    delay 1
    end tell
    tell window "Variable Links"
    click checkbox "Use InDesign Tags Filter"
    end tell
    end tell
    end tell

    Hi craneium and welcome
    For me this script fails, going through it step by step it seems confused, as I have highlighted out in the below code.
    where is the window "Variable Links, may be I can help.
    tell application "Adobe InDesign CS3"
    activate
    end tell
    tell application "System Events"
    tell process "InDesign"
    tell menu bar 1
    click menu bar item 12 --opens spotlight search in help
    key code 125 -- highlights indesign help
    key code 125 -- highlights welcome screen
    key code 124 -- goes to apple
    key code 125 -- goes to about this computer
    key code 125 -- highlights software update
    key code 36 -- starts software update
    delay 1 -- ?
    end tell
    tell window "Variable Links" -- error cant get window variable links
    click checkbox "Use InDesign Tags Filter"
    end tell
    end tell
    end tell
    Budgie

  • All my check boxes and selection circles have disappeared. Uninstalled FF and reinstalled deleting all plug-ins, settings, and etc. IE works fine. What's messing with my boxes?

    With recent update, all my check boxes and selection circles have disappeared. I tried to uninstall FF, reinstall, but nothing fixed it. When I run safe-mode, it's fine, but then no youtube or other internet fun stuff. Tried to update plug-ins but still all jacked up. any ideas? also, my side scroll bar screws up too.

    Do you mean Firefox safe mode or Windows Safe mode?
    If it does work in Safe-mode then disable all extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    * Use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    * Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")
    If you mean Windows Safe-mode then check your security software.

  • 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

  • ITunes continuous play check boxes and iPhone sync

    Hi  Here is my problem..if I want iTunes to play each songs on my library one after the other the check boxes have to be marked BUT if I synch my iPhone with iTunes I don't want to upload on it all of my songs then I check/uncheck only the albums I want to upload.. So now, I can't play one after the other, on my MBP, the songs which are not synched on iTunes because of the check boxes? I miss something?  Thanks, ciao!

    Use playlists for syncing. One or more regular and/or smart to suit your needs.
    Checkboxes are best for marking the occasional unchecked track as something you won't want to hear unintentionally, e.g. interview tracks or holiday music out of season.
    tt2

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

  • I am new to using flash and need to know how to add check boxes and forms

    I have been going mad trying to figure this out as well as searching until exhaustion.
    So I am hoping someone can point me in the right direction.
    Okay here is what I am trying to accomplish.
    I have laid out my design as a psd and brought it into adobe flash pro cs5.
    I have menu items such as toppings that I want to put check boxes next to each and then once someone goes thru the page and places their choices,I want to be either be emailed what they have chosen from the form... This seems like it might be the easier of the ways to capture data, Or if there is a better way in flash to capture this data, I would take that as well.
    SO here is as far as I can get.
    Imported the psd and added one checkbox in front of the first item and labeled it strawberries. Now I really don't want the word strawberries to show up at all on the page,just the checkbox. But I am not sure if the label for the checkbox actually passes on the value of the checkbox.
    I admit I am lost.
    I did also slice and export this same image into dreamweaver and then I made a separate apDiv for each checkbox, and added into a form. It emails the results,but it is not outputting it in a very readable way.
    Oh I also brought this int Flash Catalyst and added the checkboxes, but I don't know where to go from there.
    So if anyone can let me know the proper way to do this or point me to some videos or tutorials or even a sample file that I can alter....
    I would really appreciate it.
    Thanks

    http://www.flashloaded.com/userguides/ezform/formelements.html

  • Check box and items help

    if zero or one check box is checked then item (NO S)is shown
    if more than one check box is checked then items will show (show S)
    <cfparam name="variables.morethanone" default="0">
    <cfset count.morethanone= 0>
    <cfloop index="checkField"
    list="#form.1#,#form.2#,#form.3#,#form.4#,#form.5#">
    <cfif checkField EQ "on">
    <cfset count.morethanone= count.morethanone + 1 >
    </cfif>
    </cfloop>
    <cfif count.morethanone GT 1>
    <cfset variables.morethanone = "1">
    </cfif>
    item<cfif variables.morethanone>s</cfif>
    i wish to have the item show items:
    in a page before submit.
    when a ((no,0) or one ) checkbox is checked and submit then
    items will become item (s disapears)
    if more than one check box is checked then s will appear/show
    after submit button.
    the code i have does not show the s on the initial page
    (before submit)
    it show as
    please click one of the following item instead i need it to
    show: please click one of the following items
    then the logic i have just explained above.
    what do i do thanks.

    I'm not exactly sure what you want to do, but here's the code
    that shows "items" when more than 1 checkboxes are checked on the
    previous form page; otherwise, it shows "item":
    <html>
    <head>
    <title>Untitled</title>
    </head>
    <body>
    Target Page:
    <br><br>
    <cfparam name="Form.Checkbox_1" default="">
    <cfparam name="Form.Checkbox_2" default="">
    <cfparam name="Form.Checkbox_3" default="">
    <cfparam name="Form.Checkbox_4" default="">
    <cfparam name="Form.Checkbox_5" default="">
    <cfset count = 0>
    <cfloop index="checkField"
    list="#Form.Checkbox_1#,#Form.Checkbox_2#,#Form.Checkbox_3#,#Form.Checkbox_4#,#Form.Check box_5#">
    <cfif checkField EQ "on">
    <cfset count = count + 1 >
    </cfif>
    <cfif count GT 1>
    <cfbreak>
    </cfif>
    </cfloop>
    item<cfif count GT 1>s</cfif>
    </body>
    </html>

  • Check-Boxes and Popup Menus

    Hi, all!
    I'm a relative novice at AppleScript.
    What I'm looking for is a way to put a check box (like in a form) into a dialog box. I'd like to put it under some buttons, or a popup menu, which brings me to my next question:
    How do you add a popup menu to a dialgo box? It wold be in place of buttons.
    I know you can use Interface Builder to do this, but I don't know how to use the Xcode and Interface builder.
    I plan on learning soon, but it's kind of a daunting program…
    Anyway, any help would be much appreciated!
    Thanks in advance!
    -Nate

    AppleScript's *Standard Additions* just provides a few simple general purpose dialogs. For dialogs with other user interface items, you will need to use Xcode or third party tools such as CocoaDialog.

  • Selection screen change with check box and radio buttons

    hi frieds
    i have an requirement that
    there is a check box in the selection screen and bydefault it has been check if it check the selection box shuld be disable
    if it uncheck the check box then selection block should enabled and in that againg two radion buttons are there. Bydefualt one radio button is enabled so that correspondng parameter is allow to enter input data. if i select the othere radio button the immeditely it allow the correpnding field entry and other radio button should be disabled with that field.
    please send the piece of code...
    regards
    vijay

    Hi,
    Use the event AT SELECTION-SCREEN OUTPUT.
    Here is an example:
    at selection-screen output.
      if gv_ucomm = 'RG1'.
        loop at screen.
          if pa_rgor = 'X'.
            if screen-name+7(1) = '2' or
               screen-name+7(1) = '1'.
              screen-input = 0.
            endif.
          endif.
          if pa_rgof = 'X'.
            if screen-name+7(1) = '1' or
               screen-name+7(1) = '3'.
              screen-input = 0.
            endif.
          endif.
          if pa_rgaa = 'X'.
            if screen-name+7(1) = '2' or
               screen-name+7(1) = '3'.
              screen-input = 0.
            endif.
          endif.
          modify screen.
        endloop.
      endif.

  • Captute the check box and display

    hi,
    In a report program se38, with the output I've displayed the check boxes before every line item, I need to keep a check box in the header row and if I check this one all the check boxes of the line items must be checked and I need to capture the particular line items if checked manually and randomly.
    i did not use grid display its a simple display with write statements.
    (in short if the first(header) check box is checked need to check remaining and need to process the check box itmes if checked as above and manually)
    thanks and regards with rewards later on

    Hi,
    Check this sample code...
    DATA: t_lineitem TYPE TABLE OF char1.
    DATA: s_lineitem LIKE LINE OF t_lineitem.
    DATA: v_header,
          v_index TYPE syindex.
    START-OF-SELECTION.
      WRITE: / 'Header check box',  v_header AS CHECKBOX.
      SKIP 2.
      DO 10 TIMES.
        s_lineitem = sy-index.
        WRITE: / 'Line item-', sy-index , s_lineitem AS CHECKBOX.
        APPEND sy-index TO t_lineitem.
      ENDDO.
    AT LINE-SELECTION.
      READ LINE 1 FIELD VALUE v_header.
      DO .
        v_index = sy-index + 2.
        READ LINE v_index FIELD VALUE s_lineitem.
        IF sy-subrc <> 0.
          EXIT.
        ENDIF.
        s_lineitem = v_header.
        MODIFY CURRENT LINE FIELD VALUE s_lineitem.
      ENDDO.
    Thanks
    Naren

Maybe you are looking for

  • ALV Guideline

    Hi Yatin Here, I want to know about Alv ( Abap List Viewer) Report. Can anyone send me Documentation? Thanks and Regards Yatin Mahetaliya.

  • Syncing 2 calendars on two laptops with 2 iPhones

    I have a rather complex iCal setup on two laptops and two iPhones. My partner and I both have a laptop and an iPhone. We keep separate calendars on our laptops and subscribe to each others calendars. Also he syncs his iPhone to his laptop through the

  • Resolving a 1:n Association to a single row

    Hi, I have a requirement wherein there are 2 BOs, and the first BO has a 1:n association to the other BO. On the UI, I want to show fields from both the BOs in ONE row, but after resolving 1 particular instance. For eg: If the 2nd BO has 3 records, a

  • EP6: Switch positions of Detailed Nav and Dynamic Nav iviews?

    By default, the Detailed Navigation iview is, from the top of the screen, first, then the Dynamic Navigation iview. Is there any way to switch this? I tried changing the layout of the Desktop Innerpage (from the content list of the Default Framework

  • 3G on X201

    Hello everyone. Does the X201 ThinkPad support 3G (as in a SIM-card)? Under "network", it says: 56K / Gigabit Lan / WiFi agn / Bluetooth / WWAN Ready It's pretty crucial to me that it does include support for 3G before I buy, since I'll be using inte