troubleshooting Question

How to use javascript to bold selected radio button text

Avatar of huzefaq
huzefaq asked on
JavaScriptCSS
3 Comments2 Solutions744 ViewsLast Modified:
Hi Guys

I have  a code which displays multiple radio buttons in <c:forEach>. Now what I need is to get the text of the selected radio button as bold. Would anyone please help me in how i can do this using javascript or anyother method

I would really appreciate any help regarding this

Here is the code which diaplys all the radio buttns inside the <c:forEach>
<td valign="top" id="WC_SingleShippingMethodDisplay_TableCell_22">

                              <input type="radio" name="shipModeId" id="WC_SingleShippingMethodDisplay_FormInput_shipModeId_In_ShipMethodPage_1" value="<c:out value="${shipModeId}"/>" <c:out value="${checked}"/>/>
                              <span class="logonheading t_td2"><c:out value="${shipMode.description.description}" escapeXml="false"/>&nbsp;
                              (<c:out value="${shipMode.description.field2}" escapeXml="false"/>)</span>
                        </td>

here is the netire <c:foreach>

-------------------------

<c:forEach var="shipModeId" items="${shippingDataBean.shipModeIds}">
                  <c:remove var="shipMode"/>
                  <wcbase:useBean id="shipMode" classname="com.ibm.commerce.fulfillment.beans.ShippingModeDataBean">
                        <c:set property="dataBeanKeyShippingModeId" value="${shipModeId}" target="${shipMode}"/>
                  </wcbase:useBean>

                  <c:choose>
                        <c:when test="${shipModeId eq orderBean.orderItemDataBeans[0].shippingModeId}">
                              <c:set var="checked" value="CHECKED" />
                        </c:when>
                        <c:otherwise>
                              <c:set var="checked" value="" />
                        </c:otherwise>
                  </c:choose>


             <tr>
                        <td valign="top" id="WC_SingleShippingMethodDisplay_TableCell_22">

                              <input type="radio" name="shipModeId" id="WC_SingleShippingMethodDisplay_FormInput_shipModeId_In_ShipMethodPage_1" value="<c:out value="${shipModeId}"/>" <c:out value="${checked}"/>/>
                              <span class="logonheading t_td2"><c:out value="${shipMode.description.description}" escapeXml="false"/>&nbsp;
                              (<c:out value="${shipMode.description.field2}" escapeXml="false"/>)</span>
                        </td>
                        <%--
                        <td valign="top" width="280" id="WC_SingleShippingMethodDisplay_TableCell_23">
                              <span class="strongtext"><b><label for="WC_SingleShippingMethodDisplay_FormInput_shipModeId_In_ShipMethodPage_1"><c:out value="${shipMode.description.description}" escapeXml="false"/></label></b></span>
                        </td>

                        <td valign="top" id="WC_SingleShippingMethodDisplay_TableCell_24">
                              <span class="text"><c:out value="${shipMode.description.field2}" escapeXml="false"/></span><br/>
                              <span class="text"><c:out value="${shipMode.description.field1}" escapeXml="false"/></span>
                        </td>
                        --%>
                        <td></td>
             </tr>
            </c:forEach>
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 2 Answers and 3 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros