Link to home
Start Free TrialLog in
Avatar of huzefaq
huzefaq

asked on

How to use javascript to bold selected radio button text

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>
ASKER CERTIFIED SOLUTION
Avatar of netsmithcentral
netsmithcentral
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of b0lsc0tt
b0lsc0tt
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I'm glad I could help you.  Thanks for the grade, the points and the fun question.

bol