hi i m attachin following code for checkboxes hope u can do same with radio
buttons
<%@ page language="java" contentType="text/html" %>
<%@ page import="com.ora.jsp.util.*" %>
<html>
<body bgcolor="white">
<form action="checkbox.jsp">
<input type="checkbox" name="fruits" value="Apple">Apple<br>
<input type="checkbox" name="fruits" value="Banana">Banana<br>
<input type="checkbox" name="fruits" value="Orange">Orange<br>
<input type="submit" value="Enter">
</form>
<%
String[] picked = request.getParameterValues("fruits");
if (picked != null && picked.length != 0) {
%>
You picked the following fruits:
<form>
<input type="checkbox" name="fruits" value="Apple"
<%= ArraySupport.contains(picked, "Apple") ?
"checked" : "" %> >Apple<br>
<input type="checkbox" name="fruits" value="Banana"
<%= ArraySupport.contains(picked, "Banana") ?
"checked" : "" %> >Banana<br>
<input type="checkbox" name="fruits" value="Orange"
<%= ArraySupport.contains(picked, "Orange") ?
"checked" : "" %> >Orange<br>
</form>
<% } %>
</body>
</html>
regards
manish joshi
----- Original Message -----
From: GW Lander <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 05, 2000 9:40 PM
Subject: Checked status of Radio Buttons on form
> I have a couple of pages that allow a user to register on a site. After
the
> user has gone through the registration process I present them with a page
> that will allow them to verify what they have entered before final
> submittal. (I am using a Java Bean session to hold the data until final
> submittal to the db.) If they need to change anything they hit an edit
link
> that will bring up the proper page they need to edit. On one of the pages
I
> have a set of radio buttons. And my problem is, when they need to edit
> something on the page with the radio buttons, I can't seem to get the
> correct radio button to be "checked" when they return to the page. I have
> no problem retrieving and inserting the text boxes though. Can anybody
> point me in the right direction to find a solution for this.
>
> Thanks a bunch,
>
> Wayne
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets