Dave,

If you name all of the checkboxes using the same name as below

<input type="checkbox" name="mail_option" value="a">Send me mail</input><BR>
<input type="checkbox" name="mail_option" value="b">Send me mail</input><BR>
<input type="checkbox" name="mail_option" value="c">Send me mail</input><BR>
<input type="checkbox" name="mail_option" value="d">Send me mail</input>

The JSP or Servlet that gets called will get all of the parameters as a
array of strings.

To read the data in a JSP or servlet use

String[] mail_option = request.getParameterValues("mail_option");

You'll receive a String array that has the value of each checkbox in a
different string.

Good luck.

Dave Bolt
ATSC/SPAWAR ASAT Team
Bolt's Law of Bandwidth - There is always plenty of network bandwidth, just
none for you.


-----Original Message-----
From: David Simcik [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 04, 2000 2:26 PM
To: [EMAIL PROTECTED]
Subject: Dynamic Forms


Hi,
    We want to be able to retrieve a list of values from a form that
will have different quantities of elements per user. Specifically, we
have a form where each user can update/delete multiple email accounts &
preferences. So something like this:

USER BOB:

[[EMAIL PROTECTED]]

X    Send me mail on event 1
X    Send me mail on event 2

[[EMAIL PROTECTED]]

X    Send me mail on event 1
X    Send me mail on event 2

The address would be in a textbox and the X's represent checkboxes. The
problem we face is uniquely naming each one of those form elements. We
would like to find a method better than incrementally naming each on of
the elements and then parsing a rather sizeable querystring afterwards
via looping. So, in short, are there any alternatives???

Thanks!
DTS

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
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".
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

Reply via email to