Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...I just wanted to say that you guys RULE, a million thank you's to whoever created, and/or manages this site. KEEP UP THE GOOD WORK..."

Geography

Where in the world do Tek-Tips members come from?
morris2020 (Programmer)
30 May 04 19:03
Hi all,

I'm very new to Struts and html & web interfaces in general and hope someone can help me a solve a problem.

A client needs to submit in a single form, selections from multiple radio button groups.  What I mean here is, for an iteration of radio buttons (3 selections a piece), they need to select one from each iteration.  So for each iteration, there are 3 choices and they need to select one from each.

My struts jsp is as follows and currently a user can only select one radio button from all of them, rather than one from each group and I'm not sure how to make them have one choice from each group - I need them to select one from every 3 but submit it in one form submission.

<table border="0" width="100%">
    <html:form action="myAction.action">        
        <logic:iterate id="myId" name="myList" indexId="myIndex">
            <logic:present name="myId">
                <tr>
                    <td align="right"><bean:write name="myId" property="myIdProperty"/></td>
                        <bean:define id="myIdProperty" name="myId" property="myIdPropert" type="java.lang.String"/>
                        <html:hidden property="<Globals.STATIC_VARIABLE>" value="<%=myIdProperty>"/>
                    </td>
                    <td align="left">
                        <html:radio property="array" value="choice 1"/>Choice 1
                        <br>
                        <html:radio property="array" value="choice 2"/>Choice 2
                        <br>
                        <html:radio property="array" value="choice 3"/>Choice 3
                    </td>
                </tr>
            </logic:present>
        </logic:iterate>
        <tr align="right">
            <td>
                <br>
                <html:submit property="submit" >
                    <bean:message key="button.myButton"/>
                </html:submit>
            </td>
        </tr>
    </html:form>                
</table>

Cheers,

-andy

Oh also, I'd like to pre-select one of the buttons and also perhaps be able to set this on the fly, perhaps based upon a previous selection (accessing from a db via ejbs).

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close