Hi.
You can use JavaScript. Before you submit the form, call a JS function that
checks the state (checked==true or checked==false) of the checkbox and
construct the url with the value of this field. For example:

function mysubmit()
{
        if ( ! document.myform.mycheckbox.checked) 
                document.myform.action="mypage.jsp?mycheckboxname=false";

        document.myform.submit(); // At this point the rest of values are
automatically appended to the URL
}

Is an idea, I haven´t test it although is well constructed.
Hope this helps.

Fran Martínez

> -----Mensaje original-----
> De:   Aruniima Chakrabarti [SMTP:[EMAIL PROTECTED]]
> Enviado el:   martes 5 de noviembre de 2002 11:34
> Para: [EMAIL PROTECTED]
> Asunto:       Re: Checkboxes using JSPs
> 
> There is a function getParameterValues which returns an array... 
> 
> Regards,
> aruniima
> 
>  -----Original Message-----
> From:   Amit Ghaste [mailto:amit@;GHASTE.COM] 
> Sent:   Tuesday, November 05, 2002 1:32 AM
> To:     [EMAIL PROTECTED]
> Subject:             Re: Checkboxes using JSPs
> 
> if the checkbox is not set the getparameter returns null, else it returns
> the corresponding value
> 
> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:JSP-INTEREST@;JAVA.SUN.COM]On Behalf Of Graeme McLaren
> Sent: Sunday, November 03, 2002 7:26 AM
> To: [EMAIL PROTECTED]
> Subject: Checkboxes using JSPs
> 
> 
> Hi all, I was wondering how you would deal with checkboxes using JSPs.  In
> PHP one way is to use the isset() function.  How would you test to see if
> a
> checkbox has been checked with JSPs?
> 
> Do you have to use a similar function or can you simply do something like:
> 
> if(thecheckbox == 1)
> {
>   print "the checkbox was checked";
> }
> 
> else
> {
>   print "the checkbox wasn't checked";
> }
> 
> 
> Cheers,
> 
> Graeme :)
> 
> 
> Public Sub House()
> 
> On Error Resume drink
> 
>          If Pint.empty = True Then
>                  Pint.refill
>    Else
>                  Pint.drink
>          End if
> 
> stomach.add Pint
> 
> MsgBox " I've had .... " & stomach.count & " Pints"
> MsgBox "VERY DRUNK"
> 
> End Sub
> 
> 
> 
> _________________________________________________________________
> Surf the Web without missing calls! Get MSN Broadband.
> http://resourcecenter.msn.com/access/plans/freeactivation.asp
> 
> ==========================================================================
> =
> 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
> 
> ==========================================================================
> 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