Disabling a Check box

In my BSP View am using two check box.
I want to disable one check box when the other one gets checked and vice versa.
Right now am doing with some logics and with server side events.I want to do this in the client side.
In <b>Java script</b> how i can code this in my BSP page where the checkbox is created with the help of htmlb.
Kindly help me in this regards.

Hi,
put this in your documentHead:
<script language="javascript">
     function uncheckyes(){
      document.form_id.yes.disabled='TRUE';
      </script>
<script language="javascript">
     function uncheckno(){
      document.form_id.no.disabled='TRUE';
      </script>
and this in your layout (documentBody):
       <htmlb:checkboxGroup columnCount = "2"
                                     id          = "expense" >
                  <htmlb:checkbox text          = "Yes"
                                  id            = "yes"
                                  onClientClick = "javascript:uncheckno()" >
                  </htmlb:checkbox>
                  <htmlb:checkbox text          = "no"
                                  id            = "no"
                                  onClientClick = "javascript:uncheckyes()" >
                  </htmlb:checkbox>
                </htmlb:checkboxGroup>
grtz
Koen

Similar Messages

  • Preventing disabling of check box - item okay in MIGO

    Dear all,
    In the MIGO transaction - during goods receipt for subcontractor material, when the item (incoming) is checked as item okay - automatically the child material (Material sent to subcontractor) is also activated thereby to enable 543 movement.
    Unfortunately some of the users are disabling the check box (for the material sent to the subcontractor). This prevents depletion of stock from the subcontractor but inflates the stock of the incoming material.
    Is there any way - either by authorisation check to prevent users disabling the check box or other methods?
    Experts suggestion is required in this regard.
    Thanks in advance.
    Regards,
    M.M

    Hi Magesh,
    it is possible. use Badi enhancement
    MB_MIGO_BADI goto
    IF_EX_MB_MIGO_BADI~POST_DOCUMENT
    tell your abaper to put the logic like
    parent ID and subcomponent ID need to select
    if either of two is not selected
    then error message will prompt not to save the GR doc since subcomponent is unselected.
    reference field EKPO check PSTYP
    hope this help you.
    regards,
    Maia
    Edited by: Maia on Apr 18, 2008 3:07 PM

  • Using Javascript to disable a check box

    Friends,
    I am stuck on what should be a simple requirement and I am hoping you can help.
    I need to disable a form region checkbox if a field on the same form region has anything entered.
    What I have done so far is:
    1) On the item that determines whether the check box should be disabled I have added a call to my Javascript function "onChange="disableDefaultDisplay();" in the "HTML Form Element Attributes"
    2) My javascript funcion is: (this is the basic version, all I am trying to do is disable the check box at this point)
    function disableDefaultDisplay()
    alert("Start of the function");
    var defaultDisplay = document.getElementById("P13_DEFAULT_DISPLAY");
    *defaultDisplay.enabled = false;*
    alert("End of the function");
    Using a combination of firebug and the alert messages I can see that function is called at the correct time (i.e. when the user changes and then leaves the field) and that the values of the variable, defaultDate are set but my attempts to disable the checkbox have yet to work!
    When I look at the type of the checkbox (through the source of the page or firebug) I see the checkbox has the following "fieldset#P13_DEFAULT_DISPLAY.checkbox_group" Do I need to do anything different to disable this type of object?
    Any help would be very much appreciated!

    Hi Andy,
    I was returning to this thread to update it with how I resolved it, so thanks for the detailed response.
    In a nutshell, the solution I used was a loop through the field set(of which there is only one item in it) and disabling it.
    Where you say:
    Secondly, checkboxes are, as you have seen, wrapped within a fieldset tag. The fieldset tag has an ID of the page item name. Each checkbox within that tag has its own ID value, which will be the fieldset ID plus "_n" (where n is a sequential number starting from 0) - thus, the first checkbox will be, for example, "P1_CHECKBOX_0", the second will be "P1_CHECKBOX_1" and so on.From my searching for a solution I had expected to see something like that. But the source for the item I was trying to disable is shown below and I can't see any numbers after it.
    Do you know why? Is it because it is the only item?
    &lt;fieldset id="P13_DEFAULT_DISPLAY" class="checkbox_group"&gt;
    &lt;input type="checkbox" name="p_v18" value="Y" id="P13_DEFAULT_DISPLAY" /&gt;&lt;/fieldset&gt;
    Regards
    Ian
    Edited by: IanC2 on Feb 8, 2009 8:07 PM
    Edited by: IanC2 on Feb 8, 2009 8:08 PM

  • Disable a check box

    Hello Experts ,
    Need help to disable a check box via Scripting .
    Appreciate your help ..
    Regards,
    Tayi

    Hi Tayi,
    You can use IapiDocumentLockManager APIs to lock/unlock a particular field.
    Let us know if this is what you are actually looking for.
    Thanks
    Devesh

  • How can I disable a check box in one screen?

    Hi,
    I need to disable a check box in the screen 1106 on the program of the transaction F110. I can do that with a user exit or what I can use to do that?
    Thanks!

    you have two options :
    user exit  , check if there is one for this transction
    i attach program below .
    field exit  :
    Within the CMOD transaction type PRFB in the transaction window.
    PRFB is the ok-code to bring up the field exits.
    You can also use Program RSMODPRF to create field exits.
    hope its help u .
    program for user exut  :
    *& Report  ZUSEREXIT                                                   *
    report zuserexit no standard page heading .
    tables : tstc, tadir, modsapt, modact, trdir, tfdir, enlfdir.
    tables : tstct.
    data : jtab like tadir occurs 0 with header line.
    data : field1(30).
    data : v_devclass like tadir-devclass.
    parameters : p_tcode like tstc-tcode obligatory.
    select single * from tstc where tcode eq p_tcode.
    if sy-subrc eq 0.
      select single * from tadir where pgmid = 'R3TR'
                                   and object = 'PROG'
                                   and obj_name = tstc-pgmna.
      move : tadir-devclass to v_devclass.
      if sy-subrc ne 0.
        select single * from trdir where name = tstc-pgmna.
        if trdir-subc eq 'F'.
          select single * from tfdir where pname = tstc-pgmna.
          select single * from enlfdir where funcname =
                                              tfdir-funcname.
          select single * from tadir where pgmid = 'R3TR'
                                    and object = 'FUGR'
                                    and obj_name eq enlfdir-area.
          move : tadir-devclass to v_devclass.
        endif.
      endif.
      select * from tadir into table jtab where pgmid = 'R3TR'
                            and object = 'SMOD'
                            and devclass = v_devclass.
      select single * from tstct where sprsl eq sy-langu and
                                       tcode eq p_tcode.
      format color col_positive intensified off.
      write:/(19) 'Transaction Code - ',
           20(20) p_tcode,
           45(50) tstct-ttext.
      skip.
      if not jtab[] is initial.
        write:/(95) sy-uline.
        format color col_heading intensified on.
        write:/1 sy-vline,
               2 'Exit Name',
              21 sy-vline ,
              22 'Description',
              95 sy-vline.
        write:/(95) sy-uline.
        loop at jtab.
          select single * from modsapt where sprsl = sy-langu and
                                             name = jtab-obj_name.
          format color col_normal intensified off.
          write:/1 sy-vline,
                 2 jtab-obj_name hotspot on,
                21 sy-vline ,
                22 modsapt-modtext,
                95 sy-vline.
        endloop.
        write:/(95) sy-uline.
        describe table jtab.
        skip.
        format color col_total intensified on.
        write:/ 'No of Exits:' , sy-tfill.
      else.
        format color col_negative intensified on.
        write:/(95) 'No User Exit exists'.
      endif.
    else.
      format color col_negative intensified on.
      write:/(95) 'Transaction Code Does Not Exist'.
    endif.
    at line-selection.
      get cursor field field1.
      check field1(4) eq 'JTAB'.
      set parameter id 'MON' field sy-lisel+1(10).
      call transaction 'SMOD' and skip first   screen.

  • Disable individual check boxes in ALV

    Hi all,
    My requirement is that I have one check box against each row. User clicks on the check box then that row is selected and on clicking the push button, bapi is called.
    If result of bapi is success, I want to disable the check box for that particular row/rows. Can you please tell me how I can achieve that? I know how to disbale all the check boxes in the list but I dont know how to disable the individual check boxes.
    Thanks and regards,
    Ridhima

    For that you need to play with the EDITABLE feature of the ALV at the field level.
    Declare a field STYLE type LVC_T_STYL as a part of your internal table. Now, for each row, append the fields of that row to the STYLE column specifying whether it has to be editable or not. You can use the attributes cl_gui_alv_grid=>mc_style_enabled and cl_gui_alv_grid=>mc_style_disabled for this.
    You can look at these threads
    https://forums.sdn.sap.com/click.jspa?searchID=524737&messageID=473177
    https://forums.sdn.sap.com/click.jspa?searchID=524737&messageID=2469829
    https://forums.sdn.sap.com/click.jspa?searchID=524737&messageID=1947071
    Regards,
    Ravi
    Note - Please mark all the helpful answers
    Message was edited by:
            Ravikumar Allampallam

  • How to disable one check box when another is checked

    Hi, I'm a first time user.
    i am trying to make text fields appar and dissapaer when check boxes are ticked. but only alow one check box to be active at one time. 
    I am making a simple form in Acrobat pro 9,
    I have two check boxes Checkbox1 & Checkbox2.
    I have two text fields Textfield1 & Textfield2
    i have added actions to checkbox1 & checkbox2 to 'hide or show' the text fields.
    Action --> on focus (checkbox1) show/hide field (textfield1) is hide
    Action --> on focus (checkbox1) show/hide field (textfield2) is show
    oposite
    Action --> on focus (checkbox2) show/hide field (textfield2) is hide
    Action --> on focus (checkbox2) show/hide field (textfield1) is show
    problem 1 - how to disable checkbox1 when checkbox 2 is ticked.
    or disable checkbox2 when checkbox1 is ticked.  
    my other problem is that this action has the same effect for ticking or unticking the checkbox.
    thanks in advance to anyone who can help.
    can you please write your answer in simple terms. Basically this is the first time i have used acrobat pro so please dont assume any knowledge at all. thansk very much .

    First, I would experiment with just check boxes and learn their properties and how they can interact.
    Have you tried using the same name for 2 check boxes and assign a different "export value" to each check box.
    Have you looked at the values a check box or boxes have when checked or un-checked?
    Have you looked at how the various actions for a field work?

  • How tdo you disable a check box

    Hi
    I'm been trying to dynamically disable (grey out) a check box using
    SET_ITEM_PROPERTY('checkbox name', ENABLED, PROPERTY_FALSE);
    This is not working and when I display the value of ENABLED using GET_ITEM_PROPERTY it shows TRUE.
    Can anyone tell me how to dynamically grey out a check box?

    Dear Friend,
    Whatever u have written is perfectly all right. Only thing can be checked is, do you have 2 items with same name if 2 different blocks. if so then provide name of block in Set_item_property statement. This technique works.
    Regards,
    Manish Trivedi
    Software Developer
    India
    [email protected]

  • Disable the check box

    Hi All,
    I have a requirement in which based on the profile option user should be able to change the value of check box.
    Name of profile option is acces_level. In this user level profile option two values are possible 'User' or 'Administrator' and there are two check boxes cb1 and cb2. I want that cb2 should be available only to the user, those have value of profile option as 'Administrator'. cb1 will be available for all.
    Thanks in advance.
    Looking forward onn this.

    I used now
    declare
    nProp varchar2(20);
    BEGIN
    nProp := fnd_profile.value('ACCESS_FOR_WISPER_PART_RESEND');
    if nProp = 'ADMINISTRATOR' then
    set_item_property('XXINFC_WISPER_PARTS_MASTER.INSPECTION_FLAG', enabled, 'property_true');
    else
    set_item_property('XXINFC_WISPER_PARTS_MASTER.INSPECTION_FLAG', enabled, 'property_false');
    end if;
    END;
    I am writing this in WHEN-NEW-FORM-INSTANCE trigger at data block level.
    Now there is only one problem. In the form I am displaying 15 values. All 15 values have there respective check boxes. Now except first check box all other check boxes are disabled. Do you have any clue why the first cbox is not disabled. There is one more thing when profile option is set with value USER (Now it should allow to update the check box) then If I change any cbox then it does not allow me to change any other check box.
    Looking forward for you reply.

  • Hiding or disabling the check boxes in Tableview  for perticular row

    Hi
       I created table view using ITAREATOR, as per my requirement i need to disable or hide the check box (which come by default) for perticular row.
       Can any body send me the code
    thanks in advance
    B.Umashankar

    Is there a hide-or-disable-checkboxes-in-a-tableView-row contest going on somewhere?
    Please check Leoiz Pas' "How to disable tableView default checkbox" and Marcel Gäbe's "TableView hide checkbox" postings earlier this week (even though there might not have been a final solution yet)!

  • How to disable/read-only check box in Receiavbles receipt application forms

    HI,
    1- I am trying to freeze the check box of apply in receipt application form but it  is not working properly some times its working fine and some time it is not. I am using when new record instance when I am using up arrow and down arrow key it is working fine, but if I am on first record and click the mouse on second row or third row using mouse It is not working and user can un- apply the receipt
    2- Due to 1 point I tried using disable that check box but it is show some error 'frm-41017 cannot set update allowed attribute of non-enabled item'.
    Please advice how can I achieve this.
    Requirement is if a receipt is related to some order then user should not allow to un apply this line from applications if it is manually applied to some invoice or credit memo then user can un apply this line from receivable application lines.
    Thanks & Regards

    Looks like your question is about the E-Business Suite version of Receivables.  As this forum is dedicated to the Fusion line of applications, please repost your question in the EBS forums to increase your chances of getting a helpful reply.
    thanks,
    Oliver
    Fusion Apps Developer Relations

  • Cisco Jabber Video 4.4 - how to disable "remember me" check box.

    Hi All
    =Situation=
    We are authenticating the Jabber Video users againts the MS Active Directory.
    If in Jabber Video the "remember me" check box is ticket and a user changes the password in MS Active Directory, after few Jabber Video login attempts the account will be locked in MS Active Directory.
    =Question=
    Is this a known behavior ?
    A) What would you suggest as remedy
    B) Is there possibility to disable the "remember me" check box.
    C) To save system resources - are there options as well to disable the check boxes in Sign-in Settings "Start Jabber Video wehn I log on to my computer" & "Sign in automatically".
    Unfortunately this will be a show stopper, If I am not able to fix this issue.
    I would appreciate any kind of feedback.
    Thanks in Advanced
    Alessandro

    Looks like you're using on-prem JabberVideo (Movi) ? - whereas this particular forum is for the "free" version hosted by Cisco.
    You've got a better chance of getting a reply by posting the question in the below thread in the Telepresence forum, the last post might be of interest too.
    https://supportforums.cisco.com/message/3748369#3748369
    /jens

  • Binding a Check Box with a User Defined Field

    Hi everyone,
    i v created a user defined field (U_CheckPro)in the system table "OITM" with two values: Y for Yes and N for No. In relation to that i v also created a check box on the form "150" and would like to know how can i bind my checkbox with  my user defined field properly.
    The user would be than able to enable or disable the check box for each item (article). The user setting schould be than be active and valid in sbo-business logic, each time an item is selected. (for example in case of sales order ID 133, "OINV").
    Any helfpul hints? Samples would be welcome as well.
    Thanks and regards
    Alban

    > First of all you should remove the valid values
    > because checkboxes does not work with valid values...
    > Just give a default value.
    Hi Rasmus,
    thank you very much for your helpful hint. I guess my problem is solved by that - nevertheless here is my complete code sequence once again in case of possible errors.
    I would appreciate any additional suggestion for improvement of the same.
    Thanks and regards
    Alban
    >>>
    Private Sub AddItem()
            ' Test UserSource
            oForm.DataSources.UserDataSources.Add("U_CheckPro", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 1)
            oItem = oForm.Items.Item("122")
            ' Adding a Static Text item
            oNewItem = oForm.Items.Add("StaticTxt2", SAPbouiCOM.BoFormItemTypes.it_STATIC)
            oNewItem.Left = oItem.Left + 20
            oNewItem.Width = 100
            oNewItem.Top = oItem.Top + 12
            oNewItem.Height = 25
            oNewItem.FromPane = oItem.FromPane
            oNewItem.ToPane = oItem.ToPane
            oNewItem.LinkTo = "CheckBox1"
            oStaticText = oNewItem.Specific
            oStaticText.Caption = "Test_Caption"
            ' Adding a Check Box item
            oNewItem = oForm.Items.Add("CheckBox1", SAPbouiCOM.BoFormItemTypes.it_CHECK_BOX)
            oNewItem.Left = oItem.Left
            oNewItem.Width = 20
            oNewItem.Top = oItem.Top + 15
            oNewItem.Height = 19
            oNewItem.FromPane = oItem.FromPane
            oNewItem.ToPane = oItem.ToPane
            oNewItem.DisplayDesc = False
            oCheckBox = oNewItem.Specific
            'binding check box to source
            oCheckBox.DataBind.SetBound(True, "OITM", "U_CheckPro")
        End Sub
    >>>

  • Getting control into my program on just clicking the check box

    Hi,
    I have created 4 check boxes in the ALV grid output. If I click on any one of the check boxes, it should disable certain check boxes. How to do this.
    Please answer this. Remember it should work the moment I click on the check box.
    Thanks,
    Prem

    Hi Prem
    Define your check boxes with the user command options. And then whatever logic about the disabling the other check boxes based on one can be done in AT SELECTION-SCREEN OUTPUT event.
    Reward points for useful answers !!
    ~Ranganath

  • What is the Short Key,For checking the check box in Data Loader ?

    When i am Transfering the data from a legacy to Oracle Apps DB, Using Data Loader tool.I stuck with an issue his i need to enable the check in a particular form using the data loader,Is there a short key Like Enter( ENT), Save and Proceed(*SP) .. Needed Badly ...
    Thank you ..

    You can be able to enable a check box or disable a check box by using the space bar, you make check box item by navigating using tab and use Space bar *SB.
    try this out
    Regards
    Ramesh Kumar S

Maybe you are looking for