473,396 Members | 2,018 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Passing with checkboxes.

What I have are two pages. One is a form with some input boxes and
check boxes on it. It is posting to a different script page that
inserts into a database and sends the fields through email. My problem
is sending the information which is checked through to the next page.
Each of my checkboxes is given the value of what should be inserted in
the table and into the email. I just need a way of determining which
checkbox is checked so I can send my information.
Thanks a bunch!
Renie83
Jul 19 '05 #1
2 7370
If the checkbox is not checked, it will not return a value:

<form method="post" action="someotherpage.asp">
<input type="checkbox" name="checkbox1" value="This is checkbox number one."
checked>
<input type="checkbox" name="checkbox2" value="This is the second
checkbox.">
<input type="submit">
</form>

post to:

Response.Write Request.Form("checkbox1") & "<hr>"
Response.Write Request.Form("checkbox2")
There will be no value for checkbox2, because it was not checked.

You could also use some logic like:
bCheckbox2WasChecked = Len(Request.Form("checkbox2")) > 0
Response.write bCheckbox2WasChecked

Ray at work

"Renie83" <re*****@lycos.com> wrote in message
news:8e**************************@posting.google.c om...
What I have are two pages. One is a form with some input boxes and
check boxes on it. It is posting to a different script page that
inserts into a database and sends the fields through email. My problem
is sending the information which is checked through to the next page.
Each of my checkboxes is given the value of what should be inserted in
the table and into the email. I just need a way of determining which
checkbox is checked so I can send my information.
Thanks a bunch!
Renie83

Jul 19 '05 #2
Easiest way is to give your check boxes all the same name,
lets say chkData, and when you go

Request("chkData")

the returned values will be the VALUEs of the checked
boxes all comma delimited;

"red,blue,green"

etc

You can make an array from this and parse the items like

aData = Split(Request("chkData"), ",")
for i = lbound(aData) to ubound(aData)
response.write aData(i) & "<br>"
next
-----Original Message-----
What I have are two pages. One is a form with some input boxes andcheck boxes on it. It is posting to a different script page thatinserts into a database and sends the fields through email. My problemis sending the information which is checked through to the next page.Each of my checkboxes is given the value of what should be inserted inthe table and into the email. I just need a way of determining whichcheckbox is checked so I can send my information.
Thanks a bunch!
Renie83
.

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Pete | last post by:
There is a Summary/Example further down... On page one of my site I have a form with some checkboxes and detailed descriptions. When the form is submitted (to page two), the values of the...
12
by: Kevin Lyons | last post by:
Hello, I am trying to get my select options (courses) passed correctly from the following URL: http://www.dslextreme.com/users/kevinlyons/selectBoxes.html I am having difficulty getting the...
12
by: zig | last post by:
I've posted this on alt.comp.lang.coldfusion, but is predominantly a javascript problem: I have a CF query which returns several rows of records. I wanted to have a checkbox on each record of...
1
by: Oleg Konovalov | last post by:
Hi, I am trying to pass a bunch of checked checkboxes (Javascript array) from page1 to the Java action class on subsequent web page (page2). (on page 1 I have a bunch of DB rows with a checkbox,...
6
by: JackM | last post by:
I have a multiple select input in a form that's being populated by a row from my database as such: <input type=\"checkbox\" name=\"subm\" value=\"$row\"> That part is working fine as I can check...
10
by: rn5a | last post by:
All the rows in a DataGrid, including the Header, are accompanied with a CheckBox. I want that when the CheckBox in the Header is checked, then all the CheckBoxes should automatically get checked....
1
by: swapna | last post by:
hi, in my project,i have problem i.e dynamically should pass values to checkboxes.i am using Jsp technology/html.in html i created checkbox but passing values to that checkbox dynamically in...
3
by: delram | last post by:
I'm trying to get user selections (using checkboxes) on one JSP page(A.jsp) and pass them on to another page. So I have one page with a list of dynamically populated items like this 1 2 ...
1
by: goutam12345 | last post by:
Hello experts, Please help.... My checkboxes are not passing respective textboxes values to another page My checkboxes are moving in a loop <input type="checkbox" name="chkID" id="chkID" ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.