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

Writing mulitple checkbox values to table

Guest
Sep 18, 2006 Sep 18, 2006

Copy link to clipboard

Copied

I have create an asp page using jscript that has dynamically created checkboxes from an access db table. Each checkbox has a unique name and a unique value. The names are always in a series and are named "cb1" through "cb20". I have set up the form to post the information to another verification asp page that passes the checkbox values via a querystring. The second asp page uses the cbX values to look up and display information. Up to this point all works great. I have created an
"insert" server behavior which will post the cbX value(s) to a table where I have created a variable which can be incremented and stepped through via a loop. If I manually set my counter to a specified value it works fine but when I try to modify the server behavior to loop through the process (ie increment the counter and write the next checkbox value) I either end up in an infinite loop or it only writes the first checkbox value selected. I need some help on setting up a valid loop and just can't seem to figure this out. Where in the server behavior should I put my increment and looping functions? Any help would be greatly appreciated as I am working on a timeline.
TOPICS
Server side applications

Views

339
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 ,
Sep 20, 2006 Sep 20, 2006

Copy link to clipboard

Copied

What is the code that you have written for the loop?


--
Paul Whitham
Certified Dreamweaver MX2004 Professional
Adobe Community Expert - Dreamweaver

Valleybiz Internet Design
www.valleybiz.net

"hotdiggidydog" <webforumsuser@macromedia.com> wrote in message
news:eemh3g$f26$1@forums.macromedia.com...
>I have create an asp page using jscript that has dynamically created
>checkboxes
> from an access db table. Each checkbox has a unique name and a unique
> value.
> The names are always in a series and are named "cb1" through "cb20". I
> have
> set up the form to post the information to another verification asp page
> that
> passes the checkbox values via a querystring. The second asp page uses
> the cbX
> values to look up and display information. Up to this point all works
> great.
> I have created an
> "insert" server behavior which will post the cbX value(s) to a table where
> I
> have created a variable which can be incremented and stepped through via a
> loop. If I manually set my counter to a specified value it works fine but
> when
> I try to modify the server behavior to loop through the process (ie
> increment
> the counter and write the next checkbox value) I either end up in an
> infinite
> loop or it only writes the first checkbox value selected. I need some
> help on
> setting up a valid loop and just can't seem to figure this out. Where in
> the
> server behavior should I put my increment and looping functions? Any help
> would be greatly appreciated as I am working on a timeline.
>


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
Guest
Sep 25, 2006 Sep 25, 2006

Copy link to clipboard

Copied

LATEST
Paul, do you have any ideas you could help me out with? Any direction you could give me on where to insert the loop would be appreciated.

Thanks

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
Guest
Sep 21, 2006 Sep 21, 2006

Copy link to clipboard

Copied

Code is too long to post (1000+ lines). I was just using a while statement and incrementing the loop counter on each pass. I created a server behavior to insert one checkbox field and then attempted to insert the loop prior to the Response.Redirect statement in the insert function created by dreamweaver. It works for a staticly assigned variable, just can't seem to figure out where to insert the looping statements in the dreamweaver insert record code to handle submitting multiple checkbox values in the same table. Does this make sense?

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
Guest
Sep 22, 2006 Sep 22, 2006

Copy link to clipboard

Copied

I posted my code in an htm file you can view...

http://www.hotdogwebs.com/ftp_test/my_code.htm

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