I'm not sure I'm reading your message correctly.  Do you want to know
how to initialize a radio button value?

You use the "checked" attribute in the <input> tag:

        <input type="radio"
                name="<%= course.getName() %>"
                value="Advanced"
                <% if (course.getLevel() == LEVEL_ADVANCED)
                        out.print("checked"); %>
                />

Jeff Schnitzer
[EMAIL PROTECTED]

>-----Original Message-----
>From: Kemp Randy-W18971 [mailto:[EMAIL PROTECTED]]
>Sent: Friday, December 15, 2000 8:24 AM
>To: Orion-Interest
>Subject: setting radio buttons in JSP with database values
>
>
>This is probably a simple question, but I can't find the 
>answer.  I am developing some JSP forms mapping values to a 
>CMP bean and RDMS database.  My boss wants to change some text 
>fields in the JSP pages for adding and updating to radio 
>buttons.  I can easily set the value with code like this on 
>initial adding:
>
><tr> 
>      <td class="normaltext" width="122" height="32"> 
>        <div align="center"> 
>          <input type="radio" name="Course001" value="No">
>          <span class="newslist">N</span> 
>          <input type="radio" name="Course001" value="Basic">
>          <span class="newslist">B</span> 
>          <input type="radio" name="Course001" value="Advanced">
>          <span class="newslist">A</span></div>
> </td>
>
>When I get to the update part, I am not sure how to set the 
>radio button to a database value. Can someone share a code 
>example in the TD element for setting the radio button with a 
>value from a database or point me to a web site?  I can't find 
>any in my JSP books.  
>
>

Reply via email to