Disable only one radio button in a Radiogroup using Dynamic Actions.

Hello everyone,
I'm using Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit with Application Express 4.1.1.00.23
I have a radio group which has 3 radio buttons. Now in certain situations I want only one of the radio buttons to be disabled.
I don't want to resort to Javascript for this as that would mean another piece of code that can go wrong and introduce bugs.
Is this possible using a Dynamic Action? Although DA is also JS, I feel its much easier to maintain.
Regards,
Arijit

I know, you did ask for DA
Try to put this code in DA and run this code on page load
=-==========================================
var pOption = 3;
var nameArray = $('input[name=p_v01]').map(function(){
                    return this.getAttribute('value');
                }).get();
for (i=0;i<nameArray.length;i++){
    if(pOption == nameArray[i]){           
        $("#P2_CHECK1_"+i).attr("disabled", true);
==========================================
Plain Javascript
<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[i]){           
            $("#P2_CHECK1_"+i).attr("disabled", true);
$(document).ready(function(){
    var chkOption = 3;
    disableCheckBox(chkOption);
</script>
Thanks,
Ramesh P.

Similar Messages

  • How to disable when one radio button is selected

    Hi Folks,
    One of our requirement is as follows,
    Scenario: We have two columns with radio buttons and two dropdown box for the same columns to select the values.
    Requirement: When user select one radio button then the other radio button and its relevant dropdown both is disabled.
    Radio Buttons:
    Company
    EmpNo
    Dropdown Box:
    Company
    EmpNo
    If CompName Radio button is selected then Radio Buttom and Dropdown Box for Policy Id is disabled.
    Finally, The filter is applied on CompName to populate the values in dropdown
    Thanks Guys,
    KK

    look for a function like setActive or setDisable

  • One radio button flag is stored as'Y' in backend

    Dear All,
    Good Evening
    i have 5 radio buttonss,these radio buttons have one radio group,
    i want to select only one radio button at a timee
    before saving i select 1 radio buttonnn
    no i don't want to store that record with first radio button valuee
    so i select 4 th radio buttonnn
    and save that recordd
    that time i want to save only 4 th radio button value as 'Y'
    remaining are nulll
    but here both 1st and 4th radio button values are 'Y'
    how to resolve this problem

    I did not think that it was Google, so I created a stripped-down version of the page, removing all scripts, Google and mine. The Google interface just selects a spot on the map. My script converts this to a UK Grid reference which is then fed to the form. In the stripped down version, the form is given a typical value.
    The form will still will not perform as per spec, neither on my PC nor on my server.
    Here is the form:
    <pre><nowiki><form id="form1" name="form1" method="get" action="../cgi-bin/findPix.py">
    <p><label>Grid reference <input name="gridref" id="gridref" type="text" value="TQ776887" /></label>
    </p>
    <p> <label>Enter maximum number of images to find:<br />
    <input name="maxcount" id="maxcount1" value="1" type="radio" /> One
    <input name="maxcount" id="maxcount5" value="5" checked="checked" type="radio" /> Five
    <input name="maxcount" id="maxcount10" value="10" type="radio" /> Ten
    <input name="maxcount" id="maxcount20" value="20" type="radio" /> Twenty
    </label></p>
    <p> <label>Enter the maximum distance to look from your
    chosen point:<br />
    <input name="maxdist" id="maxdist1" value="1" type="radio" /> One Km
    <input name="maxdist" id="maxdist2" value="2" checked="checked" type="radio" /> Two Km
    <input name="maxdist" id="maxdist5" value="5" type="radio" /> Five Km
    <input name="maxdist" id="maxdist50" value="50" type="radio" /> Unlimited
    </label></p>
    <input name="button" id="button" value="Submit" type="submit" />
    </form></nowiki></pre>

  • Select one radio button at a time

    Hi all,
    my webdynpro table contains 3 rows. each row contains one radio button. at a time i should select only one radio button and bydefault the first one should be select.
    Thanks,
    Sagarika

    Hi,
    when the view will load,  bydefault radio button of first row of webdynrpo table should check. in this part i am facing problem.
    in my onaction-method i wrote the down code for 'deselect radio button if i will select other one'.my node is 'paticipants'.
      " Uncheck  other Radio button if selected
      DATA: lo_nd_participants  TYPE REF TO if_wd_context_node,
            lo_changed_elem     TYPE REF TO if_wd_context_element,
            lo_elem             TYPE REF TO if_wd_context_element,
            lt_elem_set         TYPE wdr_context_element_set,
            ls_chgd_participant TYPE LINE OF wd_this->elements_participants,
            ls_participant      TYPE LINE OF wd_this->elements_participants.
      FIELD-SYMBOLS:
            <fs_participant>   TYPE LINE OF wd_this->elements_participants.
      " Get the changed context row
      CALL METHOD wdevent->get_context_element
        EXPORTING
          name  = 'CONTEXT_ELEMENT'
        RECEIVING
          value = lo_changed_elem.
      " Get static attributes
      CALL METHOD lo_changed_elem->get_static_attributes
        IMPORTING
          static_attributes = ls_chgd_participant.
      " Navigate from <CONTEXT> to <PARTICIPANTS> via lead selection
      lo_nd_participants = wd_context->get_child_node( name = wd_this->wdctx_participants ).
      IF lo_nd_participants IS INITIAL.
        RETURN.
      ENDIF.
      " Get all the selected elements from the context
      lt_elem_set = lo_nd_participants->get_elements( ).
      " Process the elements
      LOOP AT lt_elem_set INTO lo_elem.
        CALL METHOD lo_elem->get_static_attributes
          IMPORTING
            static_attributes = ls_participant.
        IF ls_participant-prim_userid NE ls_chgd_participant-prim_userid.
          ls_participant-admin_ind = abap_false.
          lo_elem->set_static_attributes( ls_participant ).
            ENDIF.
      ENDLOOP.

  • Enable/disable/defaulting the radio button in tabular Form

    Hi friends,
    I have one radio button column in my tabular form with 3 values for it.
    <li>FC
    <li>BC
    <li>EC
    I need to enable/disable the radio buttons according to the position of the user.
    If the position of the user is CEO means,
    then FC radio button has to be checked defaultly and also for him he needs to have BC and EC radio buttons to be enabled.
    If the position of the user is between(1-4) grades means,
    then FC radio button has to be disabled, but BC radio button has to be checked defaultly and also for him he needs to have EC radio buttons to be enabled.
    If the position of the user is between(4-6) grades means,
    then FC, BC radio button has to be disabled, but EC radio button has to be checked defaultly.
    How i can achieve this radio button enabling/disabling and defaulting it dynamically according to the user.
    Where i need to specify this kind of restriction inorder to work for me in my application.
    Brgds,
    Mini

    Hi Bob,
    thanks for your reply first, and your suggestion too.
    I tried in the below manner on the lov definition of my radio button and it hide/shown according to the user who logs into the application.
    SELECT 'FC' d, 'FC' r FROM DUAL WHERE lower(:APP_USER) = (select lower(user_name) from apps.xxhy_ams_details_v where upper(job_name) = 'CEO')
    UNION ALL
    SELECT 'BC' d, 'BC' r FROM DUAL WHERE lower(:APP_USER) IN (select lower(user_name) from apps.xxhy_ams_details_v where grade_name
    BETWEEN 1 and 4 OR lower(:APP_USER) = (select lower(user_name) from apps.xxhy_ams_details_v where upper(job_name) = 'CEO'))
    UNION ALL
    SELECT 'EC' d, 'EC' r FROM DUALBut how i can check the radio button defaultly according to the user who logs in .
    <li> If the employee with the position CEO logs into the application means, he needs to have FC to be checked defaultly.
    <li> If the employee with the grade between(1-4) logs into the application means, he needs to have BC to be checked defaultly.
    <li> If the employee with the grade between(5-12) logs into the application means, he needs to have EC to be checked defaultly.
    Note:
    Instead of hide/show the radio buttons defaultly whether it is possible to enable/disable the radio button according to the user who logs into the application.
    Brgds,
    Mini...

  • How to make buttons as disable based on radio button selection in .htm

    Hi
    I have two radio buttons. So i want that when i select one radio button other buttons should become disable in
    .htm in crm webui.
    Thanx,
    Nawal kishore.

    I am not sure why u need this .. but if you disable the radio button, user won't be able to change the radio buttons any more!!!
    You can do it in this way.
    1. go to the radio button attribute of the context node ..
    if get_p_xxxx method is present then modify that to include the below code. If not present create the method. see any standard method
    CASE iv_property.
       WHEN if_bsp_wd_model_setter_getter=>fp_server_event.
          rv_value = 'selected'. "remember case
    endcase.
    2. create a event with the name 'selected'. "" case is important
    3. check in do_handle_event if the event is created or not..." if there is not event added in that method, you need to add your method name there...
    4. set some flag in the event method which you have to access from the get_i_XXX method(XXX is the radio button attribute).
    depending on the flag you make it disable.

  • Have you chosen only one option button at a time

    Hi...
        I have got a problem while working with the option button in screen painter.I have three option buttons. In Run time, I want to select only one option button, mean while the other two option buttons should not be selected.
    ~
    Thank You in Advance
    Roseline Christina. B

    Hi,
    Please check the following
    To select an OptionBtn item, the item must be bound to a data source (UserDataSource or DBDataSource) using OptionBtn.DataBind
    The following is the sample to add 2 option buttons and group them.
    Dim optBtn As SAPbouiCOM.OptionBtn
        Dim oFrm As SAPbouiCOM.Form
        Dim oItem As SAPbouiCOM.Item
        Dim oUserdatasource As SAPbouiCOM.UserDataSource
        ' set oFrm = ..
        'Option 1
        Set oItem = oFrm.Items.Add("BD_rbRes", it_OPTION_BUTTON)
        oItem.Left = 240
        oItem.Top = 10
        oItem.Height = 16
        oItem.Width = 220
        Set optBtn = oItem.Specific
        optBtn.Caption = "Button One"
        Set oUserDataSource = oFrm.DataSources.UserDataSources.Add("BD_resDS", dt_SHORT_TEXT,1)
        optBtn.DataBind.SetBound True, , "BD_resDS"
        'Option 2
         Set oItem = oFrm.Items.Add("BD_rbPost", it_OPTION_BUTTON)
         oItem.Left = 240
         oItem.Top = 30
         oItem.Height = 16
         oItem.Width = 220
         Set optBtn = oItem.Specific
         optBtn.Caption = "Button Two"
         oItem.Visible = False
         Set optBtn = oItem.Specific
         optBtn.GroupWith ("BD_rbRes")
    Hope this helps,
    Vasu Natari.

  • Short dump ( PNP LDB )More than one radio button is active

    Hello Guys!!!
          I am working on HR report and I’m using <b>PNP LDB</b> . on output when I select “Current month” and select “personal area” single values and hit  execute button . Its giving me short dump “<b>More than one radio button is active </b> “. Why is that any body can help me ?
    Cheers
    Usman

    Also check on AT SELECTION-SCREEN OUTPUT. You`re not selecting any of them too...
    Checkout this code ..
    I declare PNP in attributes and AT SELECTION-SCREEN OUTPUT.
      PNPTIMR5 = ' '.
      PNPTIMR3 = 'X'. ( Just comment it or give error message )
    its giving short dump ,if I try to do the same thing you describe in your post !
    Hope this’ll help you
    Thanks
    Saquib

  • Only one Apply button for Dashboard Prompt in obiee

    Hi experts,
    We have a need wer we need to place prompts at specified places like one at right top then next 3 one below other. But only one Apply button.
    Please let me know how to customize OBIEE 11.1.1.5 to achieve this.
    Thanks in advance.

    Hi,
    You are using OBIEE 11g ,so constrain the second report should be on the first prompt.I mean,In the second prompt properties we have an option like "based on the other prompt";where you need to give the first prompt column name.like wise third prompt also.
    Then you will get only one apply button for 3 prompts.
    mar if helpful/correct..
    thanks,
    prassu

  • How to create a radio button on OA Page using Personalization

    I am trying to create a radio button on OA Page using Personalization. The item style , I can see is Message Radio Group.
    How to create Message Radio Button and bring them under one group.
    Thanks

    You should use jdev to define a radiogroup and radio buttons under that, wrap that definition inside a stackLayout in jdev, use personalization to add a stackLayout and extend the region which you had created earlier in jdev.

  • I have a mixer which i was using with my pc and now i bought a new macbook and it have only one jack for headphones and to use mixers i need jack for microphone too so what should i do

    i have a mixer which i was using with my pc and now i bought a new macbook and it have only one jack for headphones and to use mixers i need jack for microphone too so what should i do

    You need to get headset splitter adapter.
    http://www.startech.com/Cables/Audio-Video/Audio-Cables/35mm-4-Position-to-2x-3- Position-35mm-Headset-Splitter-Adapter-Male-to-Female~MUYHSMFF

  • How do I give the radio buttons a buttongroup and id dynamically as the datagrid is populated?

    I am using the following component as an item renderer for a
    <mx:DataGridColumn>
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:mx="
    http://www.adobe.com/2006/mxml"
    >
    <mx:HBox horizontalAlign="left" left="10">
    <mx:RadioButton />
    <mx:RadioButton />
    <mx:RadioButton />
    <mx:RadioButton />
    <mx:RadioButton />
    </mx:HBox>
    </mx:Canvas>
    How do I give the radio buttons a buttongroup and id
    dynamically as the datagrid is populated?

    "nikos101" <[email protected]> wrote in
    message
    news:g83gfl$m8o$[email protected]..
    >I am using the following component as an item renderer
    for a
    ><mx:DataGridColumn>
    >
    >
    > <?xml version="1.0" encoding="utf-8"?>
    > <mx:Canvas xmlns:mx="
    http://www.adobe.com/2006/mxml"
    >
    > <mx:HBox horizontalAlign="left" left="10">
    > <mx:RadioButton />
    > <mx:RadioButton />
    > <mx:RadioButton />
    > <mx:RadioButton />
    > <mx:RadioButton />
    > </mx:HBox>
    > </mx:Canvas>
    >
    > How do I give the radio buttons a buttongroup and id
    dynamically as the
    > datagrid is populated?
    What is your actual goal?

  • Help with script to only allow one radio button

    i have made a simple script that checks to see if a radio
    button is selected or not, if more then one is picked it turns the
    hilite of the others off. The problem is i have 28 radio buttons
    over 7 scenes i want to allow one button to be on from each scene
    but the way my code works now is it turns off every button apart
    from the last one choosen. Is there a way to do this has one
    behaviour or do i need to have a altered version on each scene?

    There are many ways to do this - one way or the other you
    need to group the buttons
    1) Based on your example you could simply use the member
    names for grouping - instead of just comparing the name of the
    clicked member, compare whether or not char[2] of the name is the
    same as the clicked member. If so, deselect.
    2) You have the me parameter in your code, which suggests you
    are writing a behaviour which is attached to each radio on the
    stage. You could use sendAllSprites from the clicked member to tell
    other members to deselect. This way it will only affect any other
    radios on stage at the time and you don't need to hard code.
    Something like (pseudo-code)
    on mouseUp me
    clickedName = sprite(me.spriteNum).member.name
    sendAllSprites(#radioclicked, me, clickedName )
    end
    on radioclickedme, clickedName
    if sprite(me.spriteNum).member.name = clickedName then
    sprite(me.spriteNum).member.hilite = 1
    else
    sprite(me.spriteNum).member.hilite = 0
    end if
    end
    hth
    johnAq

  • How to set button disabled wile processing radio button request.

    Hi,
    I have one panel gropu layout and inside that i am displaying radio buttons, select many check box and save button. Actually on change of radio button selection based on the value selected i am seltting some values selected in select many check box. the problem here is when we are changing selection for radio button and while it is in processing user can click on save button. so until the radio button change is complete we want to disable save button and once process is complete we want to enable save button.
    Please help me on this.
    Thanks in advance.

    Hi,
    try this
    <af:resource type="javascript">
            function enforcePreventUserInput(evt) {
                var popup = AdfPage.PAGE.findComponentByAbsoluteId('popupBusyPage');
                if (popup != null) {
                    AdfPage.PAGE.addBusyStateListener(popup, handleBusyState);
                    evt.preventUserInput();
            function handleBusyState(evt) {
                var popup = AdfPage.PAGE.findComponentByAbsoluteId('popupBusyPage');
                if (popup != null) {
                    if (evt.isBusy()) {
                        popup.show();
                    else {
                        popup.hide();
                        AdfPage.PAGE.removeBusyStateListener(popup, handleBusyState);
          </af:resource>
    <af:popup id="popupBusyPage" animate="false" contentDelivery="immediate"
                      autoCancel="disabled">
              <af:panelWindow id="d2" closeIconVisible="false" modal="false"
                              title="Processing"
                              titleIconSource="/images/processWind_ena.png"
                              contentHeight="10">
                <af:panelGroupLayout layout="horizontal" id="pgl2" halign="center">
                  <af:image source="/images/process_animation_blafplus.gif" id="i1"/>
                </af:panelGroupLayout>
              </af:panelWindow>
            </af:popup>add client listener tag to radiobutton
    <af:clientListener method="enforcePreventUserInput" type="valueChange"/>
    How-to show a glasspane and splash screen for long running queries
    Regards,
    Edited by: Santosh Vaza on Aug 13, 2012 12:02 PM

  • How to disable the single radio button in radionbuttongroup????

    Hi Experts,
      I created the RadiobuttonbyKey UI element and i have set it to the SimpleType which has two values.Say Ex:
        Simple Type : 1 bus
                             2 train
    My Requirement is onActionxxxx i have to display only one raiobutton in the Group and onActionyyyy i have to show both the radiobuttons in the group.
    Can anyone please help me how to achieve this..............
    Regards,
    Mahesh

    hi Mahesh ,
    which UI element you are using ......radio button group is group by key or group by index  ?
    if it is group by key above specified code holds ,
    if is group by index , then you have bind a node of cardinaility 0...n and with one attiribute in that node.
    in onActionxxxx()
       wdcontext.nodeRadioButton().invalidate();
    IPrivateDynamicTableView.IRadioButtonElement element;
    element = wdContext.createRadioButtonElement();
    element.setValueRadioButton("Train");
    wdContext.nodeRadioButton().addElement(element);
    and in onActionyyyyy()
    wdcontext.nodeRadioButton().invalidate();
    IPrivateDynamicTableView.IRadioButtonElement element;
    element = wdContext.createRadioButtonElement();
    element.setValueRadioButton("Train");
    wdContext.nodeRadioButton().addElement(element);
    element = wdContext.createRadioButtonElement();
    element.setValueRadioButton("Bus");
    wdContext.nodeRadioButton().addElement(element);
    Regards
    Govardan Raj

Maybe you are looking for