Correction:
if (type == "checkbox" && id=="XXXX" && checked)
----- Original Message -----
From: "Sami Saul" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 12, 2002 17:26
Subject: Re: Check boxes
> This way (array) can be very slow if you have a lot of "checkboxes" (I
have
> a page with 1000).
>
> Try something like this:
>
> var cbs = document.all.tags("INPUT");
> for (var i=0; i<cbs.length; i++)
> with(cbs [i])
> if (type == "checkbox" && id="XXXX" && checked)
> doSomethng();
>
>
> It's much more faster than use an array.
>
> Best regards,
>
>
> Sami
>
>
>
>
> ----- Original Message -----
> From: "Lai, Kenny" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, March 12, 2002 17:05
> Subject: Re: Check boxes
>
>
> > you need to put it in a javascript for or while loop, and check the
> > formvalues as a ARRAY. (since checkboxes can be the same name for all
the
> > elements, javascript creates an array for this.) while in your for loop,
> if
> > the condition meets, do such and such..
> >
> > kenny
> >
> > -----Original Message-----
> > From: Panayiotis Periorellis
> > [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, March 12, 2002 9:46 AM
> > To: [EMAIL PROTECTED]
> > Subject: Check boxes
> >
> >
> > Hello All,
> >
> > Can someone let me know how do we retrieve the value of a check box.
> >
> > How can I say in pseudo..
> >
> > If (chekcbox C1 is checked) {
> >
> > Do this....
> >
> > }// and if
> >
> > I would appreciate a response
> >
> > panos
> >
> >
>
==========================================================================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