Thanks Mark for the suggestion.
As I am using it, I am faced with another problem.
Now my form looks like:
<input type="checkbox" name="PremGrading"
value="GPG040602155857107" > MLP PREMIUM PLUS - Ontario
<input type="hidden" name="GPG040602155857107" value="MLP
PREMIUM PLUS - Ontario" ><BR>
<input type="checkbox" name="PremGrading"
value="MYB040602155857123" > MLP Premium PLUS rev.2003 - mlp base
<input type="hidden" name="MYB040602155857123" value="MLP
Premium PLUS rev.2003 - mlp base" ><BR>
After the form is submitted, I can verify the hidden fields are in
the request.form collection by going through all the elements of it.
I can also find the descriptions if I hard code the names of the
hidden fields in the request.form() statement.
But I am having trouble finding descriptions of the checked items
dynamically. Only the first description is displayed, all others are
empty. There is no error raised. This is what I am doing in
the 'action' page after the form is submitted:
PremGradingIdList = trim(request.form("PremGrading")) 'csv string
PremGradingIdArray = split( PremGradingIdList, ",") 'array
For i = 0 to ubound( PremGradingIdArray )
response.write PremGradingIdArray(i) & "<BR>"
response.write request.form(PremGradingIdArray(i)) & "<BR>"
next
Am I doing something wrong? Any help will be highly appreciated.
Mokles
--- In [EMAIL PROTECTED], Mark E
<[EMAIL PROTECTED]> wrote:
> Mokles,
>
> When you are building your checkboxes, also build a hidden control
that has the description. Name it the same as value of your
corresponding checkbox. This this:
>
> <input type="checkbox" value="GPG040602155857107"
> name="PremGrading"> MLP PREMIUM PLUS - Ontario
> <input type="hidden" name="GPG040602155857107" value="MLP PREMIUM
PLUS - Ontario">
>
> When you get the value of your checkbox (ex: GPG040602155857107),
do a request.form on this name and you can then get the value of the
hidden control with the description.
>
> Mark
>
> moklesurr <[EMAIL PROTECTED]> wrote:
> Hi all,
> I have a form that has some checkboxes, as in the following code:
>
> <input type="checkbox" value="GPG040602155857107"
> name="PremGrading" > MLP PREMIUM PLUS - Ontario<BR>
> <input type="checkbox" value="MYB040602155857123"
> name="PremGrading" > MLP Premium PLUS rev.2003 - mlp base<BR>
> <input type="checkbox" value="WDT040602155857140"
> name="PremGrading" > MLPPREMPLU+2.00S - Qmp2<BR>
>
> The value and descriptions come from a database. The user can
select
> any number of choices from the checkbox list.
>
> After the form is submitted, I would like to capture both the
values
> and the descriptions of the choices selected in the next page. I
can
> get the values in request colloection. How do I get the
descriptions?
>
> Any help will be highly appreciated.
>
> Thanks,
> Mokles
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/17folB/TM
--------------------------------------------------------------------~->
---------------------------------------------------------------------
Home : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
Post : [EMAIL PROTECTED]
Subscribe : [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
---------------------------------------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/active-server-pages/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/