> -----Original Message-----
> From: Kenny G. Dubuisson, Jr. [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 08, 2002 7:48 AM
> To: [EMAIL PROTECTED]
> Subject: Checkboxes
>
> I have a checkbox question.  I'm trying to retreive a value
> from an HTML
> checkbox in my JSP code.  I want the checkbox to have 3
> states:  1) null
> meaning the page is hit the first time; 2) checked with a
> value of "Y"; 3)
> unchecked with a value of "N".  What I seem to be getting are
> the first two
> and not the third.  Instead of showing an unchecked value of
> "N", I get just
> a value of null.

If a checkbox is set, you'll get a request parameter value for it.  If it is
not checked, you will not get a request parameter value for it.  That's how
it works.  Your code which reads the request parameter values has to
understand that.  If you don't see the parameter, the box wasn't checked.

===========================================================================
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://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to