You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Caroline Jen <ji...@yahoo.com> on 2004/10/04 16:55:46 UTC
How To Display Checkboxes in a Table with an Additional Select All Box?
I can create tables and I can also create check boxes.
Now, I have to do a combination of check boxes and
tables:
I am reading membership data from a database table. I
am going to display the information of each member in
a table.
The table has five columns. Four of those five
columns are name, title, e-mail address, and telephone
number.
I also have to display a check box for each of the
members. Therefore, there is a check box for each
row. And the check box is the fifth column.
In addition, I must have a "Select All" check box on
top of the page.
Users either select all or make multiple selections
from the list. A check mark will submit the value of
e-mail address of each member.
What is the way of doing it?
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: How To Display Checkboxes in a Table with an Additional Select All Box?
Posted by Caroline Jen <ji...@yahoo.com>.
Thanks for your prompt reply. Please help me a little
further because I do not understand:
"Analytical: you could always select them on the
server side, in which case you'd already paint them on
the right state."
CJen
--- "Freddy Villalba A." <fv...@pericless.com>
wrote:
> Hi,
>
> If I understood your question, I guess the most
> simple solution is
> JavaScript: name all your checkboxes in a certain
> way (say, for instance,
> use a prefix like "memberSelector_") and create a
> JavaScript function that
> toggles on / off the elements whose name begin with
> that prefix.
>
> I guess there is always the classic topic: what if
> the user has disabled
> JavaScript?
>
> 2 answers:
>
> - Superficial: in that case, I believe you will have
> bigger problems than
> just how to check a silly checkbox.
>
> - Analytical: you could always select them on the
> server side, in which case
> you'd already paint them on the right state.
>
> Hope that helps,
> Freddy.
>
> -----Mensaje original-----
> De: Caroline Jen [mailto:jiapei_jen@yahoo.com]
> Enviado el: lunes, 04 de octubre de 2004 16:56
> Para: struts-user@jakarta.apache.org
> Asunto: How To Display Checkboxes in a Table with an
> Additional Select
> All Box?
>
>
> I can create tables and I can also create check
> boxes.
> Now, I have to do a combination of check boxes and
> tables:
>
> I am reading membership data from a database table.
> I
> am going to display the information of each member
> in
> a table.
>
> The table has five columns. Four of those five
> columns are name, title, e-mail address, and
> telephone
> number.
>
> I also have to display a check box for each of the
> members. Therefore, there is a check box for each
> row. And the check box is the fifth column.
>
> In addition, I must have a "Select All" check box on
> top of the page.
>
> Users either select all or make multiple selections
> from the list. A check mark will submit the value
> of
> e-mail address of each member.
>
> What is the way of doing it?
>
>
>
> _______________________________
> Do you Yahoo!?
> Declare Yourself - Register online to vote today!
> http://vote.yahoo.com
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> user-help@struts.apache.org
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> user-help@struts.apache.org
>
>
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: How To Display Checkboxes in a Table with an Additional Select All Box?
Posted by "Freddy Villalba A." <fv...@pericless.com>.
Hi,
If I understood your question, I guess the most simple solution is
JavaScript: name all your checkboxes in a certain way (say, for instance,
use a prefix like "memberSelector_") and create a JavaScript function that
toggles on / off the elements whose name begin with that prefix.
I guess there is always the classic topic: what if the user has disabled
JavaScript?
2 answers:
- Superficial: in that case, I believe you will have bigger problems than
just how to check a silly checkbox.
- Analytical: you could always select them on the server side, in which case
you'd already paint them on the right state.
Hope that helps,
Freddy.
-----Mensaje original-----
De: Caroline Jen [mailto:jiapei_jen@yahoo.com]
Enviado el: lunes, 04 de octubre de 2004 16:56
Para: struts-user@jakarta.apache.org
Asunto: How To Display Checkboxes in a Table with an Additional Select
All Box?
I can create tables and I can also create check boxes.
Now, I have to do a combination of check boxes and
tables:
I am reading membership data from a database table. I
am going to display the information of each member in
a table.
The table has five columns. Four of those five
columns are name, title, e-mail address, and telephone
number.
I also have to display a check box for each of the
members. Therefore, there is a check box for each
row. And the check box is the fifth column.
In addition, I must have a "Select All" check box on
top of the page.
Users either select all or make multiple selections
from the list. A check mark will submit the value of
e-mail address of each member.
What is the way of doing it?
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org