Help needed regarding radio button

Hi,
I am new to oracle apex and am building some pages.I came across a problem which can be described as follows...
I have a form in which there are check boxes(p1_item1,p1_item2.....p1_item10), what i am tryng to do is when the user clicks the first check box(p1_item) then all of the other checkboxes must be deselected( if any of them are selected before)and if the user clicks any of the remaining checkboxes then the first check box must get deselected if it was selected before.i want this to be do this dynamically before the submit button.
i tried several things and was not successful. If any one can direct me through the steps i will be thankful.Thanks in advance.
Sai

user583282,
Please update your profile to include a user-friendly name... makes it easier to communicate.
I have a report that needed something pretty much identical to your form need.
The code was modified from Sergio's blog. Feel free to modify it to suit your needs.
This code can go in the header of your region...
<script type="text/javascript">
    function ToggleAll(e)  {
             if (e.name == "f10") {
                if (e.checked) {
                   ClearAll();
             else {
                ClearF10();
    function Check(e) {
             e.checked = true;
    function Clear(e) {
             e.checked = false;
    function ClearAll() {  
             var ml = document.wwv_flow;   
             var len = ml.elements.length; 
             for (var i = 0; i < len; i++)  {     
                  var e = ml.elements;
if (e.name == "f01") {
Clear(e);
ml.f01.checked = false;
function ClearF10() {
var ml = document.wwv_flow;
var len = ml.elements.length;
for (var i = 0; i < len; i++) {     
var e = ml.elements[i];
if (e.name == "f01") {
Clear(0);
ml.f10.checked = false;
</script>
For the "Main" checkbox, paste this into the Label of the item:
<input type="checkbox" name="f10" value="" onclick="ToggleAll(this)">For each of the other items, past this into the Label of the item:
<input type="checkbox" name="f01" value="" onclick="ToggleAll(this)">NOTE the f10 versus f01.
What will (should) happen is when you check the "Main" checkbox (f10) it should clear all of the the "Other" item checkboxes (f01) and when you check any of the "Other" checkboxes then it should clear the "Main" checkbox.
There may be a better or more efficient way so if anyone else has some input here I won't take any offence...
Cheers,
Mike

Similar Messages

  • Help needed in Radio buttons (ABAP web dynpro)

    Hi all,
    I need to implement 2 stand alone Radio buttons (not groupbykey or groupbyindex). I could add the same in my view layout, but I am not sure how to use the KeyToSelect and SelectedKey options. How do I control when the button is selected/deselected and how do I obtain this information from my context?
    Thanks in advance guys!
    -Shalini.

    hi shalini....
    create two attributes of type string for the two rado buttons and give two different default values for that. say a and b...
    bind the attribute to the property selected key...
    give the default value as the key to select in the property....
    or you can bind the same attribute to both the buttons and read the attribute to check which value has been selected...
    you can also go through wdr_test_events component.
    ---regards,
       alex b justin

  • Help required : Dynamic Radio Buttons.

    Hi All,
    Requirement is as follows :
    1. I am having an internal table , suppose it has 5 records , then I need 5 radio buttons on screen.
    2. I need to dynamically name these radio buttons , based on one of the field of same internal table .
    Please help to get an optimised approach to implement the same .
    Thanks and Regards
    Harsh

    Hi Harsh,
      A better approch would be to create a selection-screen with 15 buttons to start and make invisible other radio buttons that you dont want in the at selection-screen output event.
    You can try like below:
    parameters: r1 radiobutton group rad1 default 'X',
                        r2 radiobutton group rad1,
                       r15 radiobutton group rad1.
    at selection-screen output.
    describe table itab lines n.
    l_cnt = 15 - n.
    do l_cnt times.
    n = n+1.
    concatenate 'r'  n  into l_radioname.      <<< n no of radio buttons wanted
    loop at screen.
    if screen-name = l_radioname.
    screen-invisible = 1.
    modify screen.
    endif.
    endloop.
    enddo.
    i hope you got a breif idea as to how you can go forward.
    Regards,
    Himanshu

  • Need Help on JSP Radio Buttons please

    How do i create radio buttons on a HTML file to link to other JSPs??
    do i have statements in my HTML that gets a JSP i.e option and then that runs the links to the other pages?
    please help very stuck and confused. Thanks

    Hi ..kinda new to java and jsp , worked with abit ...
    I have a problem have to solve. I have 2 jsp pages..one is for header displays a picture at top and has four radio buttons choices. Then at bottom of window is other jsp this jsp displays the result of whatever is choosen fromt he four buttons at top in the other frame from 1st jsp.
    I kinda have part of answer from your post about onclick. But how do i pass a value from the 1st jsp to the 2nd. jsp. There is some code in the second page that displays certian pages depending on what the value is from the four radio buttons.
    any help much appreciated :)

  • Regarding Radio button in selection screen?

    Hi experts,
    In my selection screen I am having two radio buttons.
    By default I am selecting the first radiobutton and displaying a selection block correspoding to that below.
    If I am selecting second radio button I want to display another selection block regarding to that second radio button.
    At that time first selection block should be hidden or should be disabled.
    Please help me out with sample codings.
    Thanks,
    Sakthi.

    Hi ,
    Try like this..
    TABLES : mara.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE select.
    PARAMETERS : p1 RADIOBUTTON GROUP rado USER-COMMAND hi DEFAULT 'X',
                 p2 RADIOBUTTON GROUP rado.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 .
    SELECT-OPTIONS : s_hello FOR mara-matnr MODIF ID m1,
                     s_hi FOR mara-mtart NO-EXTENSION NO INTERVALS MODIF ID m2.
    SELECTION-SCREEN END OF BLOCK b2 .
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        CASE screen-group1.
          WHEN 'M1'.
            IF p1 = 'X'.
              screen-active = 1.
            ELSE.
              screen-active = 0.
            ENDIF.
          WHEN 'M2'.
            IF p2 = 'X'.
              screen-active = 1.
            ELSE.
              screen-active = 0.
            ENDIF.
        ENDCASE.
        MODIFY SCREEN.
      ENDLOOP.
    AT SELECTION-SCREEN ON s_hi.
      CHECK sy-ucomm NE 'HI'.
    START-OF-SELECTION.
      IF p1 = 'X'.
        WRITE 'hi'.
      ENDIF.
    cheers,
    Sai

  • Regarding Radio Buttons

    Hello,
    My self created one Radio button group, in that i am created set of radio buttons.
    Then by default it is selecting one radio button.
    Now i dont want to be keep selecting bydefault one radio button in that group. For this what should I do.
    Thank you

    Hi,
    Radio buttons are meant for that only.........
    One radio button should be selected by default...
    If you want that functionality then you can use check box instead of radio butoons.
    Orelse take three radio buttons in a group and leave the one which is selected by default and use the other two for your programming.
    Reward if helpful.
    Regards,
    Syed

  • Help needed Regarding Project Server - 2013 Workflow

    Hi All,
    I am new to Project server 2013 Workflow, hence please help me regarding this. Pardon me if this question is too trivial. 
    I have created a project type associated with a workflow and my workflow is as follows :
    So I am not doing anything here, I am just testing the workflow as mentioned by technet site : http://technet.microsoft.com/en-us/library/dn458865(v=office.15).aspx
    But it is mentioned that, after a minute or 2, the workflow state will change, also they have mentioned to press the Submit button.
    But in my case, the workflow is not moving to next stage [It just says 'The workflow is still processing - which never changes after hours] or I am getting the submit button (Submit button is disabled on the ribbon). Below is the state of my workflow :
    PS : I have made the user added to Portfolio managers group as well. But still I am having this same issue. 
    The Workflow manager is installed properly, and it is working fine in case of List workflow. I am facing the issue only wrt Site workflow for Project server 2013.
    Please help me to solve this issue.
    Thanks,
    shanky

    Hi Kiran,
    I am now facing issue while assigning a task to a person in the workflow.
    I am having a person named say 'John' , who is included in Project Manager as well as Portfolio Manager.
    And I am using a workflow as :
    Stage : Conceptual
    Assign a task to John (Task outcome to Variable: Outcome5 | Task ID to Variable: TaskID3 )
    Transition to stage
    Go to Approval
    But this is again giving issue as :
    Workflow Internal status : Cancelled
    Details: System.ApplicationException: HTTP 401 {"error":{"code":"-2147024891, System.UnauthorizedAccessException","message":{"lang":"en-US","value":"Access denied. You do not have
    permission to perform this action or access this resource."}}}
    PS : I have used the same Sharepoint admin account for 'Account Name' in ‘User Profile Sync' , Is this causing the issue? Please let me know.
    Thanks,
    Shanky

  • Help needed regarding the updation of "Relationships" in BP

    Hello Guys,
    This is to request you to kindly help me regarding the following.
    We have a scenario where all the employees assigned to an Organizational unit (in PPOMA_CRM) are not showing in the "Relationships" ("Has Employee")in the BP transaction of that Organizational Unit.
    Could anyone let me know whether there is any update program that updates the "Relationships" from the Organizational asssignment. Or we need to enter the employees manually in BP "Relationships". Please help. Thanks in anticipation.
    Regards,
    Kishore.

    Hi Amit,
    Thanks alot for your reply. Its really helpful for me.
    So,we usually enter these relationships manually only, right? Before going ahead with the custom program, could you please let me know whether there is any SAP note related to this.Once again thanks alot for you help.
    Regards,
    Kishore.

  • Help me with Radio Buttons and Subform fields, please!

    I've built a dynamic order form with three product options listed as radio buttons. The three options are "Contoured" "Standard" and "Custom". "Contoured" requires five subfields to be filled in if it is selected. "Standard" requires two subfields to be filled in if it is selected. "Custom" has no associated subfields.
    My problem is that I can't figure out a script that isolates the subfields to the appropriate radio buttons. Can anyone suggest a script to use?
    Thanks in advance.
    Brian

    Brian, to understand what I did, I will first explain my hierarchy.
    RBList has 3 radio buttons: A, B, C. Specify the Item Value for each Radio button, e.g. A=1, B=2, C=3. For radio button A, create 2 dropdown lists & 3 numeric fields and wrap in a subform called SubA - ensure you leave it as Visible presence. For radio button B, create 1 dropdown & 1 numeric, wrap in a subform called SubB, and make sure this is visible. I put my code on the subforms (SubA and SubB) rather than the radio buttons. Also, in order for the layout to be saved in Reader, if you want to save and reopen, you must use the script on the Calculate event. The Click event will not save the layout for you (learnt this from past experience in Designer 7.2 Designer 8 saves layout different again). The event Calculates the function as soon as you open up the file.
    Using JavaScript on the Calculate event, on the SubA subform would look like this:
    if (RBList.A.rawValue !=1) {
    this.presence = "hidden";
    else {
    this.presence = "visible";
    Using JavaScript on the Calculate event, on the SubB subform would look like this:
    if (RBList.B.rawValue !=2) {
    this.presence = "hidden";
    else {
    this.presence = "visible";
    The radio button C would not require script if there is not subform needed.
    Let me know if this works for you.

  • Regarding radio button and selection screen

    hi
    i have a requirement to grey out one particular select option , if any one of 4 radio button is selected. (total 5 radio buttons ) . 
    how do i proceed .
    SELECTION-SCREEN BEGIN OF BLOCK blk WITH FRAME.
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE  text-001.
    SELECT-OPTIONS: p_year  for  s021-spmon obligatory,
                    p_kunag  FOR vbrk-kunag  ,
                    p_matnr  FOR vbrp-matnr  ,
                    p_augru  FOR vbrp-augru_auft  ,
                    p_vbeln  FOR vbrk-vbeln  .
    SELECTION-SCREEN END OF BLOCK blk1.
    SELECTION-SCREEN BEGIN OF BLOCK blk2 WITH FRAME TITLE  text-002.
    PARAMETERS: nrw RADIOBUTTON GROUP g1 default 'X'user-command check,
                mwd RADIOBUTTON GROUP g1user-command check,
                rws RADIOBUTTON GROUP g1user-command check,
                edu RADIOBUTTON GROUP g1user command check
                standard RADIOBUTTON GROUP g1 .
    SELECTION-SCREEN END OF BLOCK blk2.
    SELECTION-SCREEN END OF BLOCK blk.
    i know we need to use at-selection screen output.
    but how do i set ONLY that particular select option , to no input.

    Hi ,
    Use like This
    User Dynamic Selection
    at selection-screen output.
      select single * from t000md.
      loop at screen.
        case screen-group1.
          when 'REL'.
            if not  p_old is initial.
              screen-input = '0'.
              screen-required = '0'.
              screen-invisible = '1'.
            endif.
            modify screen.
          when 'BEL'.
            if not p_new is initial.
              screen-input = '0'.
              screen-required = '0'.
              screen-invisible = '1'.
            endif.
            modify screen.
          when 'ARB'.
            if  p_new is initial.
              screen-input = '0'.
              screen-required = '0'.
              screen-invisible = '1'.
            endif.
            modify screen.
          when 'MTA'.
            if  p_new is initial.
              screen-input = '0'.
              screen-required = '0'.
              screen-invisible = '1'.
            endif.
            modify screen.
        endcase.
      endloop.
    Reward Points if it is useful
    Thanks
    Seshu

  • Query regarding Radio Button

    Hi Guys,
                   In my selection screen I am giving 2 radio buttons.
    My requirement is I need a sy-date field beside one radio button.
    Is there any way to do this.
    Thanks in Advance,
    Prasad.

    Hi..use this code:
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETER : ra_1 RADIOBUTTON GROUP g1 DEFAULT 'X' USER-COMMAND abc,
                ra_2 RADIOBUTTON GROUP g1.
    SELECTION-SCREEN COMMENT 7(10) display.
    *SELECTION-SCREEN COMMENT 7(10) display MODIF ID def.
    SELECTION-SCREEN END OF LINE.
    AT SELECTION-SCREEN OUTPUT.
      IF ra_1 = 'X'.
        display = sy-datum.  " you can modify the format of the date
      ELSE.
        display = sy-datum.
      ENDIF.
      MODIFY SCREEN.

  • Help with validating radio buttons

    I would like to set my radio button so they can only click it after they have entered text into the 2 previous text fields.  Can someone help me out with a script how to do that?
    Thanks

    Please try the following Script :
    // Function to enable form fields function
    EnableFormField (cFieldName) {
    // First acquire the field to be enabled
    var oFld = this.getField(cFieldName)
    // Next acquire the hidden field with the normal colors
    var oNmlFld = this.getField("NormalColorsFld");
    if(oFld) {
    // Make field interactive
    oFld.readonly = false;
    // Restore Normal Colors
    oFld.fillColor = oNmlFld.fillColor; oFld.borderColor = oNmlFld.borderColor; oFld.textColor = oNmlFld.textColor;
    // Function to disable form fields function
    DisableFormField(cFieldName) {
    // First acquire the field to be disabled
    var oFld = this.getField(cFieldName)
    if(oFld) {
    // Make field Read-Only
    oFld.readonly = true;
    // Set Grayed out colors
    oFld.fillColor = ["G", 0.75]; oFld.borderColor = ["G", 2/3]; oFld.textColor = ["G", 0.5];

  • Query regarding radio buttons

    Suppose i have created a 2 radio buttons say A1, A2. If i click A1 radio button One table which i have created should open, Similarly when i click A2 radio button Another table should Display...an u plz give code for that??

    Hi
    What do you mean by table to be displayed? You mean the data from that table to be displayed in the report output.
    first fetch the data of two tables into two internal tables ITAB1 and ITAB2
    now write the code as
    if v_r1 = 'X'.  (first radiobutton is selected)
    write: ITAB1 fields
    else.
    Write ITAB2 fields
    endif.
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • Urgent regarding radio buttons

    hi friends i created radio buttons with the if else i am checking the output is coming wight..but can we ktake case statement..? if so after case what i have to wright..?
    .ParameterS:a1 type c radiobutton group radi .
    ParameterS:a2 type c radiobutton group radi.
    ParameterS:a3 type c radiobutton group radi.
    start-of-selection.
    *if a1 = 'X'.
    *WRITE: ' A1 SELECTED'.
    *ELSEIF A2 = 'X'.
    *WRITE: '   A2 SELECTED'.
    *ELSE.
    *WRITE: '  A3 SELECTED'.
    *ENDIF.
    as follows..?
    CASE radi.
    when a1.
    write: ' a1 selected'.
    when a2.
    write: ' a2 selected'.
    when a3.
    wruite: 'a3 selected'.
    when others.
    WRITE: 'A2 SELECTED'.
    endcase....
    but this radi is not accpetin can my question is can i write case here if so how..?plz reply asap

    Hi,
    You cannot do so... since Case-EndCase can be used to value of a single variable, and depending on its value, you perform some action.
    Though it is meaningless to use Case-Endcase for your version of code, since it is not appropriate here, I am just writing it down the corresponding CASE-ENCASE version of your IF-ELSE-ENDIF so that you can better understand how it works.
    Data: v_param(2) type c.
    If a1 = 'X'.
        v_param = 'A1'.
    ELSEIF A2 = 'X'.
        v_param = 'A2'.
    ELSE.
        v_param = 'A3'.
    ENDIF.
    Case v_param.                       " so here you are checking the value of a single variable
      When 'A1'.                           " checking value using When statement
        write: ' a1 selected'.
      When 'A2'
        write: ' a2 selected'.
      When 'A3'
        write: ' a3 selected'.
    EndCase.
    Hope it clears your doubt and answers your question.
    Regards, Tapas
    <Pls reward if useful or answered>

  • Regarding Radio button position

    Hi All,
    I have a requirement in which i have 2 radio buttons and 1 push button and i have declared these three like this
    PARAMETERS: r1  RADIOBUTTON GROUP g1,
                r2 RADIOBUTTON GROUP g1.
    SELECTION-SCREEN: BEGIN OF LINE.
    SELECTION-SCREEN: PUSHBUTTON 30(30) pb01 USER-COMMAND onli
                      VISIBLE LENGTH 15.
    SELECTION-SCREEN: END   OF LINE.
    If i select the first radio button and click on the push button ztable should be updated. i have written code for this but 2nd time when user clicks on the push button with out changing the radio button position, a pop up message should be displayed like 'Nothing has been changedu2019.
    Please suggest me in this issue.
    Thanks in advance.
    Regards,
    Samatha

    text 001 :Selection screen sample
    tex t002 : List
    text 003: Alv
    text 004: None
    CONSTANTS : rbSelected TYPE c LENGTH 1 VALUE 'X'.
    DATA : p_txt type c LENGTH 100.
    SELECTION-SCREEN BEGIN OF BLOCK frame1 WITH FRAME TITLE text-001.
      SELECTION-SCREEN ULINE /10(40).
      SELECTION-SCREEN BEGIN OF LINE.
        SELECTION-SCREEN POSITION 15.
        PARAMETERS: rb1 RADIOBUTTON GROUP rb.
        SELECTION-SCREEN COMMENT 20(30) text-002.
      SELECTION-SCREEN END OF LINE.
      SELECTION-SCREEN BEGIN OF LINE.
        SELECTION-SCREEN POSITION 15.
        PARAMETERS: rb2 RADIOBUTTON GROUP rb.
        SELECTION-SCREEN COMMENT 20(30) text-003.
      SELECTION-SCREEN END OF LINE.
      SELECTION-SCREEN BEGIN OF LINE.
        SELECTION-SCREEN POSITION 15.
        PARAMETERS: rb3 RADIOBUTTON GROUP rb.
        SELECTION-SCREEN COMMENT 20(30) text-004.
      SELECTION-SCREEN END OF LINE.
      SELECTION-SCREEN ULINE /10(40).
    SELECTION-SCREEN END OF BLOCK frame1.
    IF rb1 = rbSelected.
      CONCATENATE 'You selected' text-002 INTO p_txt SEPARATED BY space.
    ELSEIF rb2 = rbSelected.
      CONCATENATE 'You selected' text-003 INTO p_txt SEPARATED BY space.
    ELSEIF rb3 = rbSelected.
      CONCATENATE 'You selected' text-004 INTO p_txt SEPARATED BY space.
    ENDIF.
    WRITE / p_txt.

Maybe you are looking for