?
Solved

Clickable radio button labels for Struts

Posted on 2007-04-03
3
Medium Priority
?
860 Views
Last Modified: 2013-11-24
I have a Struts application with a form that has a radio button group.  A typical radio button on this form looks like this:

<html:radio property="CITY" value="New York"> New York</html:radio>


I'd like to make the label for the radio button clickable, however the Struts API does not allow setting an ID for <html:radio> tag.  Has anyone been able to get this to work in their Struts app?  Here is an example how non-Struts apps would create a clickable label:

<input type="radio" id="male" name="gender" />
<label for="male">Male</label>
0
Comment
Question by:nateforrest1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 19

Accepted Solution

by:
Kuldeepchaturvedi earned 2000 total points
ID: 18847888
have a look at this..
This might help.
http://www.beernut.ca/jim/archives/002408.html
0
 

Author Comment

by:nateforrest1
ID: 18848237
Thanks!  Although the page you referred me to went to extremes that were not necessary for my application, I was reminded of the 'styleId' attribute for the tag.  

Here is what worked for me:

<html:radio styleId="chicago" property="CITY" value="Chicago"><label for="chicago">Chicago</label></html:radio>
0
 
LVL 19

Expert Comment

by:Kuldeepchaturvedi
ID: 18848335
yup! I thought that it will work.. but I was not too sure... as I am not very good at struts..

but I am glad that it worked for u.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
A solution for Fortify Path Manipulation.
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses
Course of the Month12 days, 13 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question