Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

passing dynamic form variables vi checkbox

LEGEND ,
Jun 25, 2007 Jun 25, 2007

Copy link to clipboard

Copied

Hi all

I'm trying to do what should be fairly simple, but I can't figure it out!

On page 1 I have a list of clubs and want to select some from a list via a
checkbox. The selected clubs will then be displayed on page 2, where I can
send an email to them.

Page one has the following form:
--------------
<form action="emailclubform.asp" method="post" enctype="multipart/form-data"
name="form1" id="form1">
<%
While ((Repeat1__numRows <> 0) AND (NOT rsClubs.EOF))
%>

<input type="checkbox" name="ClubID" value="1"
id="<%=(rsClubs.Fields.Item("ClubID").Value)%>"/>
<label for="checkbox">
<%=(rsClubs.Fields.Item("ClubName").Value)%></label>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
rsClubs.MoveNext()
Wend
%>
<br />
<label for="Submit"></label>
<input type="submit" name="Submit" value="Submit" id="Submit" />

</form>
---------------
This displays all the clubs and the checkboxes.

Page 2 has the following recordset (which is where I think I'm going wrong)
SELECT ClubID, ClubName, ClubEmail
FROM rotuki.Clubs
WHERE ClubID = request.Form ("ClubID")

The values from page 1 (the ClubID's) aren't passed to Page 2. I have tried
putting the ClubID as the value in the form, but that also fails.

Any help much appreciated - and if there's a better way of doing it, please
let me know.

Thanks
Chris


TOPICS
Server side applications

Views

305
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jun 25, 2007 Jun 25, 2007

Copy link to clipboard

Copied

try changing this [ value="1" to this: value="<%=(rsClubs.Fields.Item("ClubID").Value)%>"/>]
and i dont think you need the [enctype="multipart/form-data" ] part if you are just inserting radio buttons

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 26, 2007 Jun 26, 2007

Copy link to clipboard

Copied

LATEST
Hi Mike

Thnaks for the reply - but it doesn't make any difference! I have tried
changing 'post' to 'get' and request.form to request.querystring on the
results page, and numerous other things, but everything fails!

I think I could do with a step-by-strp tutorial on how to set this up - but
I've trawled te Internet for hours and haven't found anything.

Cheers

Chris


"MikeL7" <webforumsuser@macromedia.com> wrote in message
news:f5p9s5$l7j$1@forums.macromedia.com...
> try changing this [ value="1" to this:
> value="<%=(rsClubs.Fields.Item("ClubID").Value)%>"/>]
> and i dont think you need the [enctype="multipart/form-data" ] part if you
> are
> just inserting radio buttons
>
>
>


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines