Disable Single CheckBox

Hello,
I have an application where I want to disable a checkBoxe for a single row according to a specific condition. How can I do that ?
Thank in advance !

Look working example her:
https://apex.oracle.com/pls/apex/f?p=60685:2
For example if you want to disable a checkbox option, lets say you have a checkbox options
Test1 - 1
Test2 - 2
Test3 - 3
Test4 - 4
Lets say you want to disable option 3 (Test3 - 3)
Check for the Checkbox name from the firebug console (something like p_v01 here in this page).
Make sure you are passing the value of the checkbox option to be disabled which is chKOption
If you want to get value from a page item on page load use chkOption = '&P2_CHK_OPTION_VALUE.'
<script type ="text/javascript">
function disableCheckBox(pOption){
     var nameArray = $("input[name=p_v01]").map(function(){
                              return this.getAttribute('value');
                         }).get();
     for (i=0;i<nameArray.length;i++){
          if(pOption == nameArray){               
               $("#P2_CHECK1_"+i).attr("disabled", true);
$(document).ready(function(){
     var chkOption = 3;
     disableCheckBox(chkOption);
</script>
Thanks,
Naidu789
If you think, I have answered your question, please mark it as answered.

Similar Messages

  • How to disable single cell in table control.

    Hi my requirement is to disable single cell in the table control. Please let me know How to do this.
    If possible please provide good module pool examples.
    Harish

    Hi,
    I´m not quite sure if this is gonna work. You have to make a loop over the screen and then you can change some characteristics of it, which includes the Input option:
      LOOP AT SCREEN.
        IF screen-group1 = 'ABC'.
          screen-input = '0'.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    I´ve used this code for selection screens but could help you. Check in SE11 all options for SCREEN.

  • Disabling a checkbox which is in a table, from managed bean

    disabling a checkbox which is in a table, from managed bean -
    i am able to iterate table and get/set value of checkbox but i want to disable it, how can i do that?
    FacesContext facesContext = FacesContext.getCurrentInstance();
    Application app = facesContext.getApplication();
    ExpressionFactory elFactory = app.getExpressionFactory();
    ELContext elContext = facesContext.getELContext();
    ValueExpression valueExp = elFactory.createValueExpression(elContext, "#{bindings}", Object.class);
    DCBindingContainer bindings = (DCBindingContainer) valueExp.getValue(elContext);
    DCIteratorBinding iter = bindings.findIteratorBinding("dogsIterator");
    RowSetIterator rit = iter.getRowSetIterator();
    rit.reset();
    while(rit.hasNext()) {
    Row currentRow = rit.next();
    Attribute attr = (Attribute)row.getAttribute("checked");
    what code should come here to disable checkbox?
    rit.closeRowSetIterator();
    thanks.

    Wes Fang wrote:
    You might find it easier to simply use EL and evaluate that value on the disable property:
    <af:column ...>
    <af:selectBooleanCheckbox ... disabled="#{row.bindings.checked.inputValue==YOUR_DISABLE_VALUE?true:false}"/>
    </af:column>
    i used this approach.
    kept a bean in session and used it's property in disabled attribute - now setting this property in my bean...

  • Disabling single Screen field

    Hi Friends,
    Plz help me how to disable single Screen field in Module pool.
    I have a scenario where One of the field is drop down box,in that options if i select 1 option the next Input/outputfield and Group of radio buttons(2buttons) should be disable.
    PlZ help me with the solution

    hi
    it may help u.
    in drop down box each option should have function code.
    now in pai
    use
    case ok_code.
    when 'option 1'
    loop at screen.
    if screen name = 'group1' or screen name = ' input field name'.
    screen input = 0.
    modify screen.
    endif.
    endloop.
    endcase.
    or
    if ok_code = 'option1'.
    loop at screen.
    if screen name = 'group1' or screen name = ' input field name'.
    screen input = 0.
    modify screen.
    endif.
    endloop.
    regards
    anil

  • Single checkbox not selected

    I know this is not a javscript forum.. (WISH THERE WAS ONE On SUN.COM)..and i am sorry to post it here.. but the problem is JSP and javascript
    I have multiple checboxes.. Something like Yahoo mail.. When the inbox is opened the number of checkboxes correspond to the number of mails on that page..along with an extra one at the very top(called it Header_checkbox).. If header_checkbox is selected.. all the mails are selected and one can either delete or move the mails..
    My form is kinda similar.. I have multiple rows.. and depending on the number of rows, the checkboxes are displayed.. the Javascript function works fine if there are more than one checkboxes...It doesnt work if theres a single one.. well not a big deal since the user can click on the single checkbox and it shld be fine.. but i am curious to know why it isnt working for a single one. When i try to display the checkbox.length it gives me "undefined" (this is incase theres only one chekcbox)... for multiple chekcboxes it gives the rite number.
    Heres the code if anyone has suggestions
    Thank you
    function toggle(frm)
       var checkbox_length = frm.checks.length;
        alert(checkbox_length);
       for( var i = 0; i < checkbox_length; i++ )
          frm.checks.checked = frm.tog.checked;
    [HTML CODE]
    <FORM name="editFormatForm" method="post" action="edit_delete_filetype_format.jsp">
    <tr class="titleitem">
    <td><input type="checkbox" name="tog" onclick="javascript:toggle(this.form);"></td>
    <td>Fieldname��</td>
    <td>Format��</td>
    <td>Unique?</td>
    <td>Optional?</td>
    <td>Description</td>
    <td></td><td></td>
    </tr>
    <%
    if (fileTypeList.size() > 0)
    for (int k = 0; k < fileTypeList.size(); k++)
    formatObject = (FiletypeFormatObject) fileTypeList.get(k);
    id = formatObject.getId();
    columnName = formatObject.getColumnName();
    columnFormat = formatObject.getColumnFormat();
    uniqueness = formatObject.getColumnUnique();
    description = formatObject.getDescription();
    optional_int = formatObject.getColumnOptional();
    count++;
    %>
    <tr class="<%=htmlObj.getClassString(count)%>">
    <td><input type="checkbox" name="checks" value="<%=id%>"></td>
    <td><input type="text" name="columnName" value="<%=columnName%>"></td>
    <td><input type="text" name="columnFormat" size='30' value="<%=columnFormat%>"></td>
    <td><input type="checkbox" name="unique" <% if(uniqueness == 1) { %> checked <%}%>></td>
    <td><input type="checkbox" name="optional" <% if (optional_int == 1) { %> checked <%} %>></td>
    <td><input type="text" name="description" value="<%=description%>"></td>
    </tr>
    <% } } count++; %>
    <tr class="<%=htmlObj.getClassString(count)%>"><td></td><td><input type="submit" value="Submit Changes"></td>
    <td colspan="12"><input type="submit" value="delete"></td></tr>
    <% count++; %>
    <tr class="<%=htmlObj.getClassString(count)%>"><td></td><td colspan="12">�</td></tr>
    <% count++; %>
    <tr class="<%=htmlObj.getClassString(count)%>"><td></td><td><input value="Enter New Field..."></td>
    <td><input value=""></td><td><input type="checkbox"></td><td><input type="checkbox"></td>
    <td><input type="submit" value="Add Field"></td><td></td></tr>
    </FORM>
    [END OF HTML CODE]

    The browser creates a DOM (Document Object Model) of the document and the elements in the document. In this DOM it references the elements on the page by name. If there is more than one element with the same name it creates an array of these elements and puts the array in the DOM but if there is only one element it places this element in the array.
    If there is only one checkbox with the name "checks" this will be the object referred to as "rm.checks" and this element doesn't have an length property.
    function toggle(frm)
    var checkbox_length = frm.checks.length;
    if (checkbox_length != undefined) {
        for( var i = 0; i < checkbox_length; i++ )
           frm.checks.checked = frm.tog.checked;
    } else {
    frm.checks.checked = frm.tog.checked;

  • How to disable a checkbox

    Hi,
    I have scenario where I have 4check boxes in my selection screen.. P_PRI, P_QUA, P_NEW and P_INV.
    <b>P_PRI, P_QUA, P_NEW</b> will be selected(X) by default.
    I have a requirement like when I select the fourth Checkbox <b>P_INV</b>, the two check boxes P_QUA and P_NEW should be unchecked and should be disabled(uneditable mode) and at the same time I have to generate some warning message(Later it will display the output after showing the warning message).
    Is it possible to disable a checkbox..? If so, please tell me how to do that.
    Can anyone provide me the sample code how to do this.
    This is the selection screen logic I was talking about.
    SELECTION-SCREEN BEGIN OF BLOCK CHOOSE WITH FRAME TITLE TEXT-001.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(15) TEXT-002.
    SELECTION-SCREEN POSITION 18.
    PARAMETERS: P_PRI AS CHECKBOX DEFAULT 'X'.
    SELECTION-SCREEN COMMENT 31(15) TEXT-003.
    SELECTION-SCREEN POSITION 48.
    PARAMETERS: P_QUA AS CHECKBOX DEFAULT 'X'.
    SELECTION-SCREEN COMMENT 61(15) TEXT-004.
    SELECTION-SCREEN POSITION 78.
    PARAMETERS: P_NEW AS CHECKBOX DEFAULT 'X'.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK CHOOSE.
    SELECTION-SCREEN BEGIN OF BLOCK PRICE WITH FRAME TITLE TEXT-006.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(15) TEXT-007.
    SELECTION-SCREEN POSITION 18.
    PARAMETERS: P_INV AS CHECKBOX.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK PRICE.
    Thanks in advance.
    regards,
    Paddu.

    Hi Paddu,
    Check this out...I didn't include Warning message but once you are satisfied with this code...we can add it easily
    SELECTION-SCREEN BEGIN OF BLOCK CHOOSE WITH FRAME TITLE TEXT-001.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(15) TEXT-002.
    SELECTION-SCREEN POSITION 18.
    PARAMETERS: P_PRI AS CHECKBOX DEFAULT 'X'.
    SELECTION-SCREEN COMMENT 31(15) TEXT-003.
    SELECTION-SCREEN POSITION 48.
    PARAMETERS: P_QUA AS CHECKBOX MODIF ID m1 DEFAULT 'X'.
    SELECTION-SCREEN COMMENT 61(15) TEXT-004.
    SELECTION-SCREEN POSITION 78.
    PARAMETERS: P_NEW AS CHECKBOX MODIF ID m1 DEFAULT 'X'.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK CHOOSE.
    SELECTION-SCREEN BEGIN OF BLOCK PRICE WITH FRAME TITLE TEXT-006.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(15) TEXT-007.
    SELECTION-SCREEN POSITION 18.
    PARAMETERS: P_INV AS CHECKBOX USER-COMMAND P_INV.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK PRICE.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF p_inv = 'X' AND screen-group1 = 'M1'.
          p_qua = ''.
          p_new = ''.
          screen-input = '0'.
        ENDIF.
        MODIFY SCREEN.
    ENDLOOP.
    Regards,
    Vivek

  • Disable single user mode

    Is there a way to disable single user mode? I just booted in single user mode and w/o any password I changed my root password! In my mind this is a HUGE security hole, any one could gain root access to my laptop in a matter of less than a minute! I might as well not have a root password. I have the latest and greatest security updates, but this seems to be the biggest security risk in my mind.

    If someone has physical access to your computer, your software is vulnerable in the way that you describe. There are a couple of approaches to preventing this problem. I have not tried any of this so I can only point you to some websites.
    One way to prevent anyone booting into single user mode is to enable a password in Open Firmware, as described at Setting up firmware password protection in Mac OS X 10.1 or later. You would have to enter the password every time that you booted. And, you definitely would not want to forget your password; if you did, I don't know what you would have to do to recover.
    A second approach is to use a 3rd party patch to prohibit casual use of the single-user feature. Look here for info on such a patch: Mac OS X Single User Mode Root Access. I believe that the software discussed here forces someone to type in a password to boot in single-user mode.
    One question that I have about the second approach is whether it is possible for the patch to become out of synch with a future OS update. If that happened, one would also need a way to recover.
    I hope this helps. If you are really concerned, I suggest that you do some internet searching on this topic.
    Rich
    EMAC G4 1.0 GHz   Mac OS X (10.4.8)  

  • How to Disable a Checkbox on a report condionally.

    I have a report and I created a checkbox on this report.
    I have a button which is associated to the checkbox.
    When I check a record an click the button I delete that record.
    This all works great.
    I want to disable the checkbox based on a condition.
    Lets say I cannot delete DEPT rows 20 at all. In this case I want to disable the checkbox and do not allow use to delete these records.
    Can anyone help me on this.
    I really appreciate your help on this.

    In your SQL query, you may be able to use a CASE WHEN statement to accomplish this.
    SELECT .. CASE WHEN dept_id = 20 THEN <dont display checkbox or show disabled> ELSE <show checkbox> END
    Ravi

  • Using a Radio Button to Disable Multiple Checkboxes

    Hi everyone,
    My name is Christian and I am trying to design a form using Adobe Designer 7 that when a user selects a group of two radio buttons (one marked Macintosh and one marked Windows) it automatically disables 3 or 4 checkboxes of various software applications further down the page.
    The idea is if you select the Windows radio button, you would not be able to select the iWorks or StuffIT checkboxes (as that is Mac software), but conversely if you check Macintosh radio button the iWorks and StuffIT checkboxes activate but the Office 2003 and Microsoft Money checkboxes deactivate (because that is Windows software).
    Im not really a developer so any assistance would be appreciated. Thanks for reading and have a great day! :-)
    Christian

    I suspect that you have a problem in some portion of your code that you have not posted. To help debugging I suggest you create a simple test using two pages: input.cfm and action.cfm.  Get the most simple case working then add the javascript, css, and CF code to make your application work.
    <!--- contents of input.cfm --->
    <html>
    <head>
         <title>Input</title>
    </head>
    <body>
         <form action="action.cfm" method="POST">
              Choose type: <br />
              <input name="type" type="radio" value="male" />     Male<br />
              <input name="type" type="radio" value="female" /> Female<br />
              <input type="submit" />
         </form>
    </body>
    </html>
    <!--- content of action.cfm --->
    <html>
    <head>
         <title>Action</title>
    </head>
    <body>
         <cfif form.type eq "male">
              Type is male.
         <cfelseif form.type eq "female">
              Type is female.
         </cfif>
         Here is a cfdump of the form variables:<br />
         <cfdump var="#form#" />
    </body>
    </html>
    Message was edited by: JR "Bob" Dobbs
    Added sample for action.cfm

  • How to disable a Checkbox with condition.

    Dear experts,
    I am doing a module pool program. My questyion is, the program has a checkbox. After certain process, let's say if it met a IF condition. This checkbox needs to be disabled. No matter the checkbox previously is ticked or without tick. The checkbox need to be completely disabled.
    Please advice how should I do it. As I have search in the forum for some time, but I could not get my answer.
    Appreciate if someone can help. Thanks in advance.

    Hi,
    3 problems.
    1. U r using lower case for check boxes screen name
    2. Screen-invisible is used to make data of the parameter invisible while typing eg: PASS WORD.
    3. What ever modification we are doing is over written in AT SELECTION SCREEN OUTPUT event.
    use screen input attribute as i told earlier.
    AT SELECTION SCREEN OUTPUT is analogous to PBO of
    Dialog program
    Check below modified code. It is working fine now.
    SELECTION-SCREEN END OF BLOCK b1.
    INITIALIZATION.
      tt = 'Example'.
      chk1 = 'X'.
    AT SELECTION-SCREEN OUTPUT.
      IF radio1 EQ 'X'.
        LOOP AT SCREEN.
          CHECK screen-name = 'CHK2'.
          screen-input = 0.
          MODIFY SCREEN.
          EXIT.
        ENDLOOP.
      ELSE.
        LOOP AT SCREEN.
          CHECK screen-name = 'CHK1'.
          screen-input = 0.
          MODIFY SCREEN.
          EXIT.
        ENDLOOP.
      ENDIF.
    AT SELECTION-SCREEN ON BLOCK b1.
      CASE sy-ucomm.
        WHEN 'R1'.
          IF radio1 = 'X'.
            CLEAR chk2.
            chk1 = 'X'.
          ELSEIF radio2 = 'X'.
            CLEAR chk1.
            chk2 = 'X'.
          ENDIF.
      ENDCASE.
    I hope u r clear now.
    Thanks,
    Vinod.
    Edited by: Vinod Reddy Vemuru on Jul 29, 2008 4:33 PM

  • Record Level - Enabling & Disabling Item Checkbox in hierarchical Display

    Hi all,
    I need to display the a Hierarchical ALV. My requirement is to enable or disable particular Line Item's Checkbox.
                  *Header
                     Field1     Field2      Field3      Field4    Field5
                          #Item
                             'Checkbox'    Field1       Field2       Field3         Field4    Field5    Field6      Field7
    Here for perticular Item records ,the checkbox should be disabled.
    Please help me in this aspect.
    Thanks & Best Regards,
    Vishnu

    You can do that using TOP_OF_LIST event , there you can Disable or Enable the check box using the condition.
    In TOP_OF_LIST Event , read the report line by line and there you can check the condition.

  • ADF BC:Enable or Disable tableselectmany checkbox

    Hai all
    I'm developing a web application using Jdeveloper 10.1.3 and ADF BC.
    In one of my pages,there is a adf table with tableselectmany which will be rendered as a
    checkbox for each record in the table.
    My requirement is to disable or enable this checkbox according to a value of a field in the
    table.ie,If the value of a field is 'Y' it should be enabled and available
    for selection,Otherwise not.
    Is it possible to implement in ADF....
    Please help me if anybody having a solution.....
    Ans

    The "value" attribute of a selectManyCheckbox will be bound to a List or an array. When the checkboxes are rendered, the values in the List or array will determine which checkboxes are initialized as checked. The selectItem components, or selectItems component inside the selectManyCheckbox gives you the list of checkboxes and the value of each. For instance, suppose my user can select from colors Red, Blue, and Green. I would have this:
    <af:selectManyCheckbox value="#{myBackingBean.colors}" label="Colors">
      <af:selectItem label="Red" value="red"/>
      <af:selectItem label="Blue" value="blue"/>
      <af:selectItem label="Green" value="green"/>
    </af:selectManyCheckbox>In the backing bean named myBackingBean:
    private String[] colors = {"blue"};
    /* getter and setter for colors go here */The checkbox labeled "Blue" is initialized as checked, the other two checkboxes are unchecked. When the form is submitted, the array named "colors" will have the values of the checkboxes that were checked. So if the user unchecks "Blue" and checks "Red" and "Green" the new contents of colors is {"red","green"}.
    If you are asking about disabling some of the select items, that is easily done. Just bind the "disabled" attribute of the selectItem to a boolean value that evaluates to true if you want the item so that the user can't set or unset the checkbox, or the "rendered" attribute to a boolean value that evaluates to false if you don't want the item shown at all.

  • Disable the checkbox of rows in ALV

    Moderator message: please do not post the same question in more than one forum. Duplicate deleted
    Hello,
    For example we have an internal table containing the data of table RESB. The alv grid that will display this data will have a checkbox in its first column. If for example the internal table contains two reservations with two line items each, only the checkbox of the first two line items will be enabled. the rest will be grayed out. How can we do that?
    Hope you can help us. Thanks!
    Edited by: Matt on Jan 13, 2009 8:11 AM

    see this thread
    ALV checkbox  - disable
    http://www.sapfans.com/forums/viewtopic.php?t=88376
    see this sap help too
    http://help.sap.com/saphelp_nw04/helpdata/en/26/46fb40f17af66fe10000000a1550b0/content.htm

  • Spark TabBar: How to disable single tabs?

    Hi,
    I wrote already a bug report about this issue, but no one responded.
    For an application I need to disable and enable tabs on the fly. So I built a TabBar with a ViewStack as a dataProvider and NavigatorContent as the single items. Then I tried disabling a NavigatorContent component so that the tab is disabled. But it is still enabled and can be selected. How can I disable a single tab? Do I have to create a custom solution or wait until the TabNavigator component is ported to Spark? (Maybe I should fall back to the halo component)
    Also the enabled property of the TabBar doesn't disable the tab content. So there seems to be no connection between the data and the TabBar.

    If you find this post looking for the answer, I posted two options here: http://forums.adobe.com/message/4153359#4153359
    =D

  • Disabling certain checkboxes with treeTable / tableSelectMany

    Hi,
    using tableSelectMany on a treeTable component my requirement is to disable (or even not to render) the checkboxes on certain rows. for example checkboxes only on every odd row....
    How can I achieve that? Is it possible with standard techniques?
    Or do I have to write a custom treetable component?
    Thanks for any help,
    Andreas.

    I was also wondering if there is a way to disable certain radio button in tableSelectOne?

Maybe you are looking for

  • Problem in WMA 2.0

    Hi all, I am using WTK 2.5.2 with netbeans 5.5.1 to receive the CBS .but the problem is it doesn't allow to import "javax.wireless.messaging.cbs.receive" class.Whenever it is in WMA 2.0 .I made change in API permission also.. Can any one tell me why

  • EDI type to create invoice

    Hi, Pls advise me which EDI message type is used to create INVOICE. Regards, Student

  • .icd File Syntax

    Is there somewhere a source for the sysntax of the .icd-files discribing camera functions ? | Dipl.-Ing. Rainer Rawer | Institut für Technik der Informationsverarbeitung (ITIV) | Universität Karlsruhe (TH) ____ ______ ____ _ __ | Postfach 6980 / _/ /

  • How do  re-arrange the oicturesin my photo gallery

    when i downloaded the picture to my ipod my pictures got scrambled and i get confused when i'm trying to find a picture so i want to change the order of my pictures

  • Adobe allways tring to install

    Adobe allways tring to install (BDB57FF279B942059447F5FE85F37312)        adobe is installed on computer but it keeps tring to install how can this be stoped