navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

Display Checkbox Array via ASP

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Display Checkbox Array via ASP
Page: [1]
 
BobbyDouglas

 

Posts: 5470
Joined: 5/15/2003
From: Arizona
Status: offline

 
Display Checkbox Array via ASP - 4/5/2008 18:59:44   
I have a form with the following checkboxes being saved in an array

<input type="checkbox" name="DriveSymptoms[]" class="checkbox" value="Fire Damage. ">Fire damage
<input type="checkbox" name="DriveSymptoms[]" class="checkbox" value="Water Damage. ">Water damage
<input type="checkbox" name="DriveSymptoms[]" class="checkbox" value="Elect Damage. ">Elect damage


Once the form is submitted, DriveSymptoms should be an array of all checked checkboxes.

How do I display the contents of DriveSymptoms? This code doesn't seem to work:

<% Trim(Request.Form("DriveSymptoms")) %>


_____________________________

Arizona Web Design - Mr Bobs Web Design in Arizona
The Arizona Web Hosting Challenge
Spooky

 

Posts: 26606
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Display Checkbox Array via ASP - 4/5/2008 19:20:57   
<% = Trim(Request.Form("DriveSymptoms")) %> :)

(in reply to BobbyDouglas)
BobbyDouglas

 

Posts: 5470
Joined: 5/15/2003
From: Arizona
Status: offline

 
RE: Display Checkbox Array via ASP - 4/5/2008 20:18:43   
These don't work

MessageBody = MessageBody & "Symptoms: " & = Trim(Request.Form("DriveSymptoms"))& "<br />"

MessageBody = MessageBody & "Symptoms: " & Trim(Request.Form("DriveSymptoms"))& "<br />"


_____________________________

Arizona Web Design - Mr Bobs Web Design in Arizona
The Arizona Web Hosting Challenge

(in reply to Spooky)
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Display Checkbox Array via ASP - 4/5/2008 20:29:22   
Does it work if you change you checkbox name from:

"DriveSymptoms[]"

to

"DriveSymptoms"

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to BobbyDouglas)
BobbyDouglas

 

Posts: 5470
Joined: 5/15/2003
From: Arizona
Status: offline

 
RE: Display Checkbox Array via ASP - 4/5/2008 21:10:34   
That worked!

I use [] when doing it via PHP. Guess ASP doesn't need that :)

THANKS!

_____________________________

Arizona Web Design - Mr Bobs Web Design in Arizona
The Arizona Web Hosting Challenge

(in reply to BeTheBall)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Display Checkbox Array via ASP
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts