Dynamic radio button display

Hi all,
when we click on the radio button of the selection screen if should display further more radio buttons down on the same screen, Can anybody please say me how it can be done.

Hi,
try this example:
PARAMETERS: P1 DEFAULT 'X' RADIOBUTTON GROUP PR1 USER-COMMAND DUMMY.
PARAMETERS: P2             RADIOBUTTON GROUP PR1 .
PARAMETERS: P3             RADIOBUTTON GROUP PR2 MODIF ID DI0.
PARAMETERS: P4             RADIOBUTTON GROUP PR2 MODIF ID DI0.
PARAMETERS: VAL1(10) MODIF ID DI1.
PARAMETERS: VAL2(10) MODIF ID DI2.
AT SELECTION-SCREEN OUTPUT.
  IF P1 = 'X'.
    LOOP AT SCREEN.
      IF SCREEN-GROUP1 EQ 'DI0'.
        SCREEN-ACTIVE = 0.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ENDIF.
  IF P2 = 'X'.
    LOOP AT SCREEN.
      IF SCREEN-GROUP1 EQ 'DI0'.
        SCREEN-ACTIVE = 1.
        MODIFY SCREEN.
        CLEAR: VAL1.
      ENDIF.
    ENDLOOP.
  ENDIF.
Regards, Dieter

Similar Messages

  • Dynamic radio button in web dynpro abao

    Hi expert,
    I want to dynamic radio button by  web dynpro abap .
    Kindly give me a soulation ASAP.
    Thanks and regard's
    Vikash

    hi,
    method wddomodifyview .
    if first_time eq abap_true.
    data: LR_CONTAINER         type ref to CL_WD_UIELEMENT_CONTAINER,
          LR_RADIOBUTTON1            type ref to CL_WD_RADIOBUTTON,
          LR_RADIOBUTTON2            type ref to CL_WD_RADIOBUTTON,     
          LR_FLOW_DATA         type ref to CL_WD_FLOW_DATA.
    " bind text property will give TEXT that appears next to Radio Button
    CALL METHOD cl_wd_radiobutton=>new_radiobutton
      EXPORTING
       bind_selected_key   =  '01' 
       BIND_TEXT           =  'saurav'
      receiving
        control             = LR_RADIOBUTTON1.
    " bind text property will give TEXT that appears next to Radio Button
    CALL METHOD cl_wd_radiobutton=>new_radiobutton
      EXPORTING
        bind_selected_key   = '02'
       BIND_TEXT           = 'mago'
      receiving
        control             = LR_RADIOBUTTON2.
    LR_FLOW_DATA        =  CL_WD_FLOW_DATA=>NEW_FLOW_DATA( element = LR_RADIOBUTTON1  ).
    LR_FLOW_DATA        =  CL_WD_FLOW_DATA=>NEW_FLOW_DATA( element = LR_RADIOBUTTON2  ).
    LR_CONTAINER ?= view->GET_ELEMENT( 'ROOTUIELEMENTCONTAINER' ).
    LR_CONTAINER->ADD_CHILD( LR_RADIOBUTTON1  ).
    LR_CONTAINER->ADD_CHILD( LR_RADIOBUTTON2  ).
    endif.
    endmethod.
    Thanx.

  • Position  for dynamic radio button

    Hi expert,
    i created a dynamic radio button in my web dynpro application but i want to give the position in top of the my view kindly give me on example for this issue.
    thank's and regard's
    vikash

    Use this.............
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/201ddd3b-b4ce-2b10-8883-880ae8147f89
    The sequence to place a new UIElement at the screen is as follows:
    1.Create the UIElement
    2.Create the LayoutData that fits to the Layout of the surrounding container
    3.Insert the UIElement into the surrounding container
    *Code to create new button dynammically:
    lr_button = cl_wd_button=>new_button( on_action = `CHANGE_TEXT` ).
    **The following coding changes the design of a button to "emphasized":*
    lr_button->set_design( cl_wd_button=>e_design-emphasized ).
    set the new text*
      lr_button->set_text( new_text ).
    For Step 2 and Step 3 refer code by Radhika.
    Thanx.
    Saurav.

  • Dynamic radio button and group

    Hi, we have create dynamic radio button and group on “application creation complete” event , but which I am try to get number of radio button its show zero, see below code
    import flash.utils.setTimeout;
    import mx.controls.Alert;
    import mx.events.FlexEvent;
    import spark.components.RadioButton;
    import spark.components.RadioButtonGroup;
    private var  rbg:RadioButtonGroup;
    private var  rb1:RadioButton;
    private var  rb2:RadioButton;
    private var dcount:int = 0;
    protected function application1_creationCompleteHandler(event:FlexEvent):void
         // TODO Auto-generated method stub
         // TODO Auto-generated method stub
         rb1 = new RadioButton();
         rb2 = new RadioButton();
         rbg = new RadioButtonGroup();
         rb1.label = "Radio1";
         rb2.label = "Radio2";
         rb1.group = rbg;
         rb2.group = rbg;
         vbox1.addChild(rb1);
         vbox1.addChild(rb2);
         checkRadioButton (); 
    protected function checkRadioButton ():void
         Alert.show("In checkRadioButton function : " +  rb1.group.numRadioButtons.toString());
    If I put some Time interval to call  checkRadioButton function its working fine,
    //checkRadioButton (); 
    setTimeout(checkRadioButton,1000);
    but this is not best practice.
    why this happen ….can anybody  clear  this or any other way to do this.
    Thanks in advance

    @manjeet.patel,
    Just write the below line of code
    vbox1.validateNow();
    You need not use setTimeout() function
    vbox1.addChild(rb1);
    vbox1.addChild(rb2);
    vbox1.validateNow();
    Thanks,
    Bhasker

  • Dynamic radio button fields do not display again after form is saved

    Hello,
    I have a group of radio button questions within a dynamic form that display additional questions based on the answer.
    So for the question "Is there a basement?" if the user indicates yes, there is a basement, additional questions are displayed to gather more information about the basement. If the user indicates no, then those questions do not appear.
    Everything works beautifully in the form. However, when the form is saved and then re-opened, the additional questions do not appear in the form. So the structure goes from this:
    To this:
    The users must toggle the radio buttons to make those questions reappear...and when they do reappear, they have maintained whatever answer the user indicated before saving.
    I'm not sure why this is happening...does anyone have any advice?
    Thank you,
    Theresa

    Hi,
    Thanks so much for your response! I am using Designer 8.2.1.
    I just played around with more of my form...this seems to happen whenever I am working with a hidden subform that is displayed when the user clicks a button (or selects the appropriate radio button). I have a couple of other places within my form where this occurs.
    Here is an example of the script on one of those buttons:
    var intNewIndex = form1.construction_type.const_type_repeat.instanceManager.count-1; 
    form1.construction_type.resolveNode("const_type_repeat[" + intNewIndex + "]").percentage.presence="visible";
    const_type_repeat.instanceManager.addInstance(true);
    The script on the radio button is:
    if (basementyes.rawValue == 4){secondwd.sump.presence ="visible"
      secondwd.sumpradio.sumpyes.presence ="visible"
      secondwd.sumpradio.sumpno.presence ="visible"
    else {secondwd.sump.presence = "hidden"
      secondwd.sumpradio.sumpyes.presence = "hidden"
      secondwd.sumpradio.sumpno.presence ="hidden"
    I am pretty new at this so it might be something obvious...thanks again for your help!

  • Dynamic radio button issues.

    Hello;
    I changed around the way I do a contact form from one page loading onto another to just one page. I had my radio buttons working the 2 page way, but now, it throws an error and says that the TYPE is undefined in the form. The type is the name of my group of radio buttons. Here is what I'm doing, can someone help me fix this so a form will remember if it has to be reloaded what radio button you chose?
    My code:
    <cfform action="#cgi.script_name#" method="post">
    <cfif form.type EQ 'male'>
    <input name="type" type="radio" onClick="setVisibility('sub3', 'inline');setVisibility('sub4','none');setVisibility('sub5','none');" value='male' checked="checked"/>
    <cfelse>
    <input name="type" type="radio" onClick="setVisibility('sub3', 'inline');setVisibility('sub4','none');setVisibility('sub5','none');" value='male'/>
    </cfif>
    <cfif form.type EQ 'female'>
    <input type="radio" name="type" value='female' onClick="setVisibility('sub3', 'none');setVisibility('sub4','inline');setVisibility('sub5', 'none');" checked="checked"/>
    <cfelse>
    <input type="radio" name="type" value='female' onClick="setVisibility('sub3', 'none');setVisibility('sub4','inline');setVisibility('sub5', 'none');"/>
    </cfif>
    <cfif form.type EQ 'child'>
    <input type="radio" name="type" value='child' onClick="setVisibility('sub3', 'none');setVisibility('sub4','none');setVisibility('sub5', 'inline');" checked="checked"/>
    <cfelse>
    <input type="radio" name="type" value='child' onClick="setVisibility('sub3', 'none');setVisibility('sub4','none');setVisibility('sub5', 'inline');"/>
    </cfif>
    those are the 3, I need this form to remember your choice, they control parts of the form. The if statement is throwing the error, this is the error:
    Element TYPE is undefined in FORM.
    The error occurred in C:\quoteReq.cfm: line 282
    Called from C:\Websites\187914kg3\quoteReq.cfm: line 276
    Called from C:\Websites\187914kg3\quoteReq.cfm: line 275
    Called from C:\Websites\187914kg3\quoteReq.cfm: line 260
    Called from C:\Websites\187914kg3\quoteReq.cfm: line 1
    280 :                 <span class="contactText">Select the type of project to get a quote.</span><br>
    281 :                 <br>
    282 :                 <input name="type" type="radio" id="type" onClick="setVisibility('sub3', 'inline');setVisibility('sub4','none');setVisibility('sub5','none');" value='male' <cfif form.type EQ 'male'>checked="checked"</cfif>/>
    283 :                 <span class="contactText">Magnets</span>
    284 :                 <input type="radio" name="type" id="type" value='female' onClick="setVisibility('sub3', 'none');setVisibility('sub4','inline');setVisibility('sub5', 'none');" <cfif form.type EQ 'female'>checked="checked"</cfif>/>   
    Can anyone help me fix this please?

    My code for this simple action is looking really nasty at this point. I agree with making this neater, it controls a lot on this page. It's a problem in the java script, let me show you how this is set up:
    if you click on a radio button (step 1 in the form) it changes a spot in the site (div tags) to your selection. I'm stripping this down to just the java right now, then add in logic to it.
    this is my java, but It's not working right now even strait up with no coldfusion involved.
    <script language="JavaScript">
    function setVisibility(id, visibility) {
    document.getElementById(id).style.display = visibility;
    </script>
    <style type="text/css">
    .showHide {
    position: absolute;
    background-color: #f1f1f1;
    width: 300px;
    padding: 1px;
    color: black;
    border: #999999 2px dashed;
    display: none;
    </style>
    <input name="type" type="radio" onClick="setVisibility('sub3', 'inline');setVisibility('sub4','none');setVisibility('sub5','none');" value='male' checked="checked"/><span class="contactText">Magnets</span>
    <input type="radio" name="type" value='female' onClick="setVisibility('sub3', 'none');setVisibility('sub4','inline');setVisibility('sub5', 'none');"/><span class="contactText">Paper Steel</span>
    <input type="radio" name="type" value='child' onClick="setVisibility('sub3', 'none');setVisibility('sub4','none');setVisibility('sub5', 'inline');"/> <span class="contactText">Both</span>
    my div tags
    <div id="sub3" class="showHide" style="display:inline;">div one content here</div>
    <div id="sub4" class="showHide">div 2 content here</div>
    <div id="sub5" class="showHide">div 3 content here</div>
    right now, this isn't functioning as is. I had it working, until I redid my form approach in programming. Now I need to rethink this. What I'm trying to do is this.
    first, get this script working again. then, once it's swaping out div tags, I need it to remember what radio button you clicked so that respective div tag stays open on page reload of any errors from required fields. f I click on a radio button and send the form with now required fields, it brings up the proper div. I also went with the structkeyexists approach and it kind of helped me, but it's making my code really big and messy going this road.
    any ideas on how to approach this problem? starting with this broken script.
    Right now, there is not dynamic interaction, but i

  • Dynamic radio buttons - Saving state?

    Hello
    I am trying to add some radio button groups to a page displaying products for sale. The number of groups depends on the record being displayed. For example, a television might have two option groups, one named 'Size' with options 24", 26", 28", another named 'Colour' with options black and silver.
    I have a DataTable bound to a HtmlDataTable in a backing bean This has an ArrayDataModel as its value. The DataTable has two columns. The first one displays the attributes name, e.g. 'Colour'. The second column displays the attributes values as a radio button group.
    When the product is loaded, the ArrayDataModel ('attributesArray') in the backing bean is populated with the product attributes. The class of objects held in the array are Object[] as this is necessary to split the data for the two columns.
    E.g. for two attribute in the table 'Size' and 'Colour'
    Object[] attributesArray = new Object[2];
    ArrayList colourSelectItems = new Array();
    ArrayList sizeSelectItems = new Array();
    SelectItem 24inch = new SelectItem(new Integer(24),"24 inch");
    SelectItem 26inch = new SelectItem(new Integer(26),"26 inch");
    SelectItem 28inch = new SelectItem(new Integer(28),"28 inch");
    SelectItem black = new SelectItem("silver","Silver");
    SelectItem silver = new SelectItem("black","Black");
    colourSelectItems.add(black);
    colourSelectItems.add(silver);
    sizeSelectItems.add(24inch);
    sizeSelectItems.add(26inch);
    sizeSelectItems.add(28inch);
    Object colourAttributeArray = new Object[]{"Colour",colourSelectItems};
    Object sizeAttributeArray = new Object[]{"Size",sizeSelectItems};
    attributesArray[0] = colourAttributeArray;
    attributesArray[1] = sizeAttributeArray;On the page i display the datatable as follows:
    <h:dataTable id="attributesTable" binding="#{addProductBean.attributesTable}" var="attribute" cellspacing="0" cellpadding="0" border="0" width="100%" columnClasses="default">
      <h:column id="attributeNameColumn">
        <h:outputText id="attributeName" value="#{attribute[0]}:" style="margin-right: 4px;"/>
      </h:column>
      <h:column id="attributeValuesColumn">
        <h:selectOneRadio id="attributeValues">
          <f:selectItems value="#{attribute[1]}"/>
        </h:selectOneRadio>
      </h:column>
    </h:dataTable>This works fine except I would like the first radio button in each group selected by default.
    This can be done pretty easy.
    I just change the row array to hold an extra element with the id of the default select item in it and add a value parameter to the h:selectOneRadio tag
    Object colourAttributeArray = new Object[]{"Colour","silver",colourSelectItems};
    Object sizeAttributeArray = new Object[]{"Size","24inch",sizeSelectItems};
    <h:selectOneRadio id="attributeValues" value="#{attribute[1]}">
      <f:selectItems value="#{attribute[2]}"/>
    </h:selectOneRadio>But there is a problem...
    Since the number of rows is dynamic there could be any number of radio button groups. As there is only one h:selectRadioButton in the display code (within the datatable tag) it can't be bound to a HtmlSelectOneRadioButton object in the backing bean. Each group loses its value if the form is submitted and returned with errors on it.
    Any solution or other help greatly appreciated. Thanks.

    I believe in this case, the standard way of doing things would be best. Create two String variables and a respective getter and setter. One String will hold the selected size, the other will hold the selected colour. Bind the value attribute of each selectOneRadio to the respective getter/setter of the backing bean.
    If you want to set the default to "silver" or "24inch", just initialize the String with those values.
    Here's how you're code will break down:
    Object[] attributesArray = new Object[2];
    ArrayList colourSelectItems = new Array();
    ArrayList sizeSelectItems = new Array();
    SelectItem 24inch = new SelectItem(new Integer(24),"24 inch");
    SelectItem 26inch = new SelectItem(new Integer(26),"26 inch");
    SelectItem 28inch = new SelectItem(new Integer(28),"28 inch");
    SelectItem black = new SelectItem("silver","Silver");
    SelectItem silver = new SelectItem("black","Black");
    colourSelectItems.add(black);
    colourSelectItems.add(silver);
    sizeSelectItems.add(24inch);
    sizeSelectItems.add(26inch);
    sizeSelectItems.add(28inch);
    Object colourAttributeArray = new Object[]{"Colour",colourSelectItems};
    Object sizeAttributeArray = new Object[]{"Size",sizeSelectItems};
    attributesArray[0] = colourAttributeArray;
    attributesArray[1] = sizeAttributeArray;
    String selectedColour = "silver";
    String selectedSize = "24inch";Don't forget to create your getter and setter for selectedColour and selectedSize in the addProductBean.
    And then create your datatable the same, but change the selectOneRadio tag like this:
    <h:selectOneRadio id="attributeValues" value="#{addProductBean.selectedColour}">
      <f:selectItems value="#{attribute[1]}"/>
    </h:selectOneRadio>Does that make any sense? Let me know how it turns out.
    CowKing
    PS - BTW, when you set the SelectItems for the TV size, you use Integer's as the value. Then later in your examples, you set the defaults using a String. Is this just a typo? I assume that you can get it working fine in whatever way you need it.

  • Dynamic Radio button

    I tried to created radio button dynamically through loop. But for the values and labels- i am not able to assign values dynamically.
    Is there any other way by which i can dynamically create radio buttons inside a loop and assign them values & labels?

    I tried to created radio button dynamically through
    loop. But for the values and labels- i am not able to
    assign values dynamically.
    Is there any other way by which i can dynamically
    create radio buttons inside a loop and assign them
    values & labels?<Display class='Radio'>
    <Property name='title' value='Account Ids:'/>
                   <Property name='labels'>
                        <dolist name='accountId'>
    <ref>:variables.accountIds</ref>               
    <ref>accountId</ref>
         </dolist>
                   </Property>
                   <Property name='required' value='true'/>
    </Display>
    hope this helps

  • Dynamic Radio Buttons

    am BRAND SPANKING NEW to java and I have a site (created by someone else obviously) which shows 2 text boxes dynamically depending on a number that is entered into the "NumAdults" box. So if you enter "2", you get:
    age.text box, tripcost.text box, age.text box, tripcost.text box
    What I'm trying to do, is add a radio button to the mix. For example, if you entered "2", I want it to show
    age.text box, tripcost.text box, member.radio button, age.text box, tripcost.text box, member.radio button.
    The code for the text boxes is working fine but the radio buttons won't work! The radio buttons are elements named rbmember1 through rbmember10. The code - (I've tried to add the radio buttons - please don't laugh) so far is as follows: - Please, can anyone see what I'm doing wrong here?
    txtNumAdults.Value = pol.Insureds.Count.ToString();
    hdnSelectedPlan.Value = pol.Pol.PlanCode;
    for(int i=0;i<pol.Insureds.Count;i++)
    TextBox txt = FindControl("txtAdultAge"+(i+1).ToString()) as TextBox;
    txt.Visible = true;
    txt.Text = pol.Insureds.Age.ToString();
    txt = FindControl("txtTripCost"+(i+1).ToString()) as TextBox;
    txt.Visible = true;
    txt.Text = pol.Insureds[i].TripCost.ToString("n");
    Radiobutton rb = FindControl("rbMember"+(i+1)) as RadioButton;
    rb.Visible = true;

    Well, it kind of looks like javascript to me.. (I didn't realize there was a difference!. . that's how new I am)

  • Dynamic Radio Buttons that offer dynamic output

    I am wondering if coldfusion has the abilty to perform the task
    I am looking for. I want to list radio buttons
    as options, and depending on which radio button the user selects,
    they are then offered a series of other radio buttons.
    Is this something coldfusion can handle, or would a different language
    be better suited for this?

    You are looking for a javascript solution.  CF or any backend can handle
    dealing with the data, sending back and forth data about what radio button
    list to show, etc easily.  But if you want no browser refreshes, then you
    need to look into javascript to display the list, use ajax to poll for
    refined radio button options, then display.  I recommend looking into jquery
    and CF.  CF can get the options from the database for you and serve to
    jquery which is run int he browser which will dictate how to display it
    nicely.
    http://api.jquery.com/radio-selector/
    <http://api.jquery.com/radio-selector/

  • 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

  • Setting/Clearing Dynamic Radio Button values

    Hi, i have the following Radio buttons defined within an iteration
    <c:forEach items="${searchresults}" var="post" varStatus="status">                                        
         <tr class = "text_results"> 
              <c:url value="/searchposts.do" var="url">
                   <c:param name="postitle" value="${post.postId.postTitle.title}"/>
                   <c:param name="postcode" value="${post.postId.postTitle.code}"/>                    
                   <c:param name="unitcode" value="${post.postId.units.unitCode}"/>
                   <c:param name="auth" value="${post.postId.auth}"/>
              </c:url>
              <td>
                   <a href='<c:out value = "${url}" />'>                                        
                   <c:out value="${post.postId.postTitle.title}"></c:out></a>
              </td>
              <td><c:out value = "${post.mustering}"/></td>  
              <td><c:out value = "${post.rank}"/></td>  
              <td>
                   <html:radio property="incmbt" 
                        value='${post.postId.postTitle.title}'>
                   </html:radio>                                             
                   <a href = "javascript:unCheckRadio(document.searchForm.incmbt)">
                        clear
                   </a>
              </td>                                             
         </tr> 
    </c:forEach>  The property "incmbt" is declared as a form property (String incmbt) with its getters and setters ... i plan to set each radio button with a value from database within an object called post. The actual value to set for each radio is a post title ... I seem to be getting a NULL value when i try to get the value in action class (form.getIncmbt() yields null) ... Am i assigning the value correctly?
    Further, here's is how i clear the values which seems to work
    Javascript
    function unCheckRadio(btngrp) {     
         for(var i=0; i < btngrp.length; i++)
              if( btngrp.checked == true ) {
                   btngrp[i].checked = false;
                   document.write("Selected Radio is :" + btngrp[i].value);
    But the "Selected Radio is :" displays "${post.postId.postTitle.title}", not the actual post title... ???

    I just thought about this quickly, i think its because an href link does not submit form values ... If so, how can i submit the value of a radio button through the <c:param/> tag or any other way after clicking the href link to submit the form?

  • To Retrieve dynamic radio button values using jsp & javascript

    Hi All,
    How can i retrive the dynamically created radio button values and also want to get the clicked radio button values.I am using JSP and JAVA beans to retrive the values from the form. I dont have any probs to retrieve combo box values, text box values only problem showing with radio button values. If any data which is entered wrong in the form all the fields should prefills with the old value.Except radio button values all others fields such as combo box, text box values are prefilled with the old values.
    I have given the code for radios.
    document.write('<input type="radio" name="distradio" OnClick="sampleReq.fcidis.value=\'Y\'"/>Yes   ');
    document.write('<input type="radio" name="distradio" OnClick="sampleReq.fcidis.value=\'N\'"/>No');
    document.write('<input type="hidden" name="fcidis" value="">')
    <form method="POST" action="Update.jsp" name="sampleReq" >
    <tr>
    <td class="Txt_gris">
    <input type="radio" name="requester" OnClick="sampleReq.requester1.value='supplier'"/> supplier
    </td>
    <td class="Txt_gris">
    <input type="radio" name="requester" OnClick="sampleReq.requester1.value='customer'"/>customer
    </td>
    <td class="Txt_gris">
    <input type="radio" name="requester" OnClick="sampleReq.requester1.value='distributor'"/> distributor
    </td>
    <td class="Txt_gris">
    <input type="radio" name="requester" OnClick="sampleReq.requester1.value='employee'"/> employee
    </td>
    <td class="Txt_gris">
    <input type="radio" name="requester" OnClick="sampleReq.requester1.value='New partner'"/>New partner
    <input type="hidden" name="requester1" value=""/>
    </td>
    </tr>
    Advanced Thanks for help
    Regards
    Sona

    Hi,
    If you have this code
    document.write('<input type="radio" name="distradio" OnClick="sampleReq.fcidis.value=\'Y\'"/>Yes ');
    document.write('<input type="radio" name="distradio" OnClick="sampleReq.fcidis.value=\'N\'"/>No');
    document.write('<input type="hidden" name="fcidis" value="">')
    <form method="POST" action="Update.jsp" name="sampleReq" >
    <tr>
    <td class="Txt_gris">
    <input type="radio" name="requester" OnClick="sampleReq.requester1.value='supplier'"/> supplier
    </td>
    <td class="Txt_gris">
    <input type="radio" name="requester" OnClick="sampleReq.requester1.value='customer'"/>customer
    </td>
    <td class="Txt_gris">
    <input type="radio" name="requester" OnClick="sampleReq.requester1.value='distributor'"/> distributor
    </td>
    <td class="Txt_gris">
    <input type="radio" name="requester" OnClick="sampleReq.requester1.value='employee'"/> employee
    </td>
    <td class="Txt_gris">
    <input type="radio" name="requester" OnClick="sampleReq.requester1.value='New partner'"/>New partner
    <input type="hidden" name="requester1" value=""/>
    </td>
    </tr>
    this field distradio will not be able Update.jsp.
    You will need to insert these field into the form definition.
    Now, to get a valeu from a radio button, you need only to do request.getAttribute("fieldName").
    To generate dinamically all radio button values, i need to know where are these information? In database? If yes, you need to read the resultset na in value attribute you need to do somethink like this <input type=radio name=fieldName value="<%out.println(resultset.getString("FieldName"));%>">
    If you have more question, only send me a email,
    best regards
    Edney Imme
    [email protected]

  • Dynamic radio button population

    Hi There
    I have the following logic to be implemented
    1) show two radio buttons A and B
    2) if user selectes A then ok do noting
    but if user selects B then
    display another set of radio buttons (6 radio buttons)
    Please let me know how to get the value of the radio button (A or B) before the form gets submitted
    I thought i will use custom tags if possible but not able to do that
    or if there is any other approach please help.

    Hi BasulC,
    Thanks for your quick reply.
    Actually I can do it using DOM but i need to use preexisting costom tags while creating the radio buttons and custom tags cannot be used in javascripts hence i am not able to do it in javascript
    is there no way to get the selected radio button value in the custom tag handler
    kind regards
    Proffy

  • Dynamic radio button group

    Hi ,
    Is there any way we can create 'Text' along with radio button groups beside the text 'YES' and 'NO' dynamically in a VIEW through 'ABAP WEBDYNPRO'. Can we create a context node with 'TEXT' attribute.
    Eg : TEXT RADIOBUTTON1 'yes' RADIOBUTTON2 'no'.
    Thanks,
    kumar

    hi,
    check this out.
    method wddomodifyview .
    data : LR_RADIOBUTTON1            type ref to CL_WD_RADIOBUTTON,
    CALL METHOD cl_wd_radiobutton=>new_radiobutton
      EXPORTING
       bind_selected_key   =  '01' 
       BIND_TEXT           =  'One'
      receiving
        control             = LR_RADIOBUTTON1.
    I think with the above code you will be able to create text along with Radio button.
    Thanx.

Maybe you are looking for