Perhaps you could read the state of the checkbox before submitting and
append to the target url using the name of the field in which the checkbox
is set and the value N if is not checked.

Something like this in JavaScript:

if ( ! yourfield.checked) {
        document.yourform.action = "YourTargetPage.xxx?yourfield=N"
}else  document.yourform.action = "YourTargetPage.xxx"

document.yourform.submit()

On submit the browser will append the rest of the fields by itself.

Hope this helps

Fran





> -----Mensaje original-----
> De:   Kenny G. Dubuisson, Jr. [SMTP:[EMAIL PROTECTED]]
> Enviado el:   martes 8 de octubre de 2002 15:48
> Para: [EMAIL PROTECTED]
> Asunto:       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.
>
> Any ideas on how to handle this?  Thanks,
> Kenny
>
> ==========================================================================
> =
> 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

===========================================================================
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