473,408 Members | 1,798 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,408 software developers and data experts.

checkbox vs text box

I posted this in an HTML forum, but I think it's going to take some
scripting to act as I want to act.

I have a form with multiple records.
My intention is to have the user click a checkbox for each product he wants.
Then submit the form placing multiple items in his cart.
If I use a text box like the following and enter a 1 for each product,
submit, no problem.
The user gets the products he wants.
<input name="qty" type="text" value="0">

However, if I use the following checkbox code, and assuming the user checks
4 products half way down the page, he will get the first 4 products in the
recordset. If he clicks 1 checkbox, he will always get the first product,
not the product he chose.
<input name="qty" type="checkbox" value="1">

What I have found is when I submit the form to a blank test page using
checkoxes or text boxes, there's a considerable difference. The text boxes
deliver a comma delimination for each occurance. The checkboxes only offer
comma delimination for each checkbox that is selected. At this point, I'm
assuming that's the difference between the two and it cannot be changed
through HTML.

How can I make the checkboxes act as text boxes?

thanks
Dec 9 '06 #1
2 1697
Hi Shank

Not sure if I am on the right track here, but are you using a different
name for each of the checkboxes? and how are they generated, from a
database or hard coded. Can we see the relevant part of your code.

Cheers

Tony

shank wrote:
I posted this in an HTML forum, but I think it's going to take some
scripting to act as I want to act.

I have a form with multiple records.
My intention is to have the user click a checkbox for each product he wants.
Then submit the form placing multiple items in his cart.
If I use a text box like the following and enter a 1 for each product,
submit, no problem.
The user gets the products he wants.
<input name="qty" type="text" value="0">

However, if I use the following checkbox code, and assuming the user checks
4 products half way down the page, he will get the first 4 products in the
recordset. If he clicks 1 checkbox, he will always get the first product,
not the product he chose.
<input name="qty" type="checkbox" value="1">

What I have found is when I submit the form to a blank test page using
checkoxes or text boxes, there's a considerable difference. The text boxes
deliver a comma delimination for each occurance. The checkboxes only offer
comma delimination for each checkbox that is selected. At this point, I'm
assuming that's the difference between the two and it cannot be changed
through HTML.

How can I make the checkboxes act as text boxes?

thanks
Dec 9 '06 #2
I'm not sure I follow you, but checkboxes aren't posted unless they're
checked.

And you can't change that.

Bob Lehmann

"shank" <sh***@tampabay.rr.comwrote in message
news:es**************@TK2MSFTNGP05.phx.gbl...
I posted this in an HTML forum, but I think it's going to take some
scripting to act as I want to act.

I have a form with multiple records.
My intention is to have the user click a checkbox for each product he
wants.
Then submit the form placing multiple items in his cart.
If I use a text box like the following and enter a 1 for each product,
submit, no problem.
The user gets the products he wants.
<input name="qty" type="text" value="0">

However, if I use the following checkbox code, and assuming the user
checks
4 products half way down the page, he will get the first 4 products in the
recordset. If he clicks 1 checkbox, he will always get the first product,
not the product he chose.
<input name="qty" type="checkbox" value="1">

What I have found is when I submit the form to a blank test page using
checkoxes or text boxes, there's a considerable difference. The text boxes
deliver a comma delimination for each occurance. The checkboxes only offer
comma delimination for each checkbox that is selected. At this point, I'm
assuming that's the difference between the two and it cannot be changed
through HTML.

How can I make the checkboxes act as text boxes?

thanks


Dec 9 '06 #3

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

Similar topics

4
by: feanor | last post by:
I need to select children checkboxes when selecting the parent one. This is my function: function SelectChildrens(checkbox_name){ form = document.forms; Sname = checkbox_name.split("-"); for...
0
by: mike | last post by:
Hi there: I've read an excellent "how to"-article by Microsoft (no. 306227) - partly cited cited at the end of this email). I have implemented the code related to the part "How to Add a...
2
by: bebop | last post by:
I'm using three checkbox web controls in C# .NET and one button, and one labe Is there a way to "group" these individual checkbox web controls If so, do I use a for loop, hashtable, array,...
1
by: dx | last post by:
I'm extremely frustrated with ASP.NET...again! To me this should be as simple as setting oCheckBox.Checked = True.. yet for some reason it isn't. I have a user control (ascx) that that has a...
0
by: Keith | last post by:
I have a repeater control that contains a HeaderTemplate and an ItemTemplate. Each item contains a checkbox with an ID of chkReconciled, and the header contains a single checkbox with an ID of...
0
by: Keith | last post by:
I have a repeater control that contains a HeaderTemplate and an ItemTemplate. Each item contains a checkbox with an ID of chkReconciled, and the header contains a single checkbox with an ID of...
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....
0
by: cyberdawg999 | last post by:
Greetings all in ASP land I have overcome one obstacle that took me 2 weeks to overcome and I did it!!!!! I am so elated!! thank you to all who invested their time and energy towards helping me...
0
by: dotnetrookie | last post by:
Hi This is my 1st post.I have two checkbox columns in gridview binded through item template. The checkboxes are Category and Subcategory. I have actually removed the duplicate values in the...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
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.