|
 |
asp_discuss thread: Check Box
Message #1 by jhd67@v... on Fri, 13 Dec 2002 00:07:52
|
|
I populate a recordset of only the "goodies" from a an Access db.
A table lists them all with a checkbox first, then a description of the
goody, then it's cost.
The user checks which goddies they want, and then submit the form.
The resulting page shows only the goodies that were checked off with their
description and cost. I've tried everything. Do Until, For Each Next, etc.
What do i use for the checkbox name and value on the preceding page?
exactly how do i request the checked items on the next page and also show
the descrip and cost?
Thank you
Message #2 by Bob Jones <Bob.Jones@t...> on Fri, 13 Dec 2002 07:28:56 -0600
|
|
When a form is SUBMITted, *only* those checkboxes that are checked are sent.
Checkboxes that are not checked are not sent. Textbox values are sent - even
if blank/empty.
Sounds like you're saying not all the fields associated with a
goody-checkbox (i.e. a table row I suppose) *that was checked* are being
sent. Really need to see what you're doing.
Like you, I also wanted to send *all* my checkboxes. So when the "SAVE"
button is clicked, I call a JavaScript function that simply sets the checked
property to true.
Things to remember:
** For every form-field that is being passed on SUBMIT, what is actually
being passed is the NAME and VALUE. That is, the <input> tag's
name="whoever" and value="whatever".
** In a <select> object, remember that what is displayed on the screen -
i.e. what the user chooses from the dropdown, is not necessarily the VALUE.
<select>
<option value="whos_on">First</option>
</select>
If the user picks "First" (on the screen) - "whos_on" gets passed (in the
form).
** If a text field (or any field) has disabled='true' then it will not be
passed
** Only checked checkboxes are passed
** options not picked from a <select> list are not passed.
** Only the chosen radio buttons are passed.
Good Luck
RLJ
-----Original Message-----
From: jhd67@v... [mailto:jhd67@v...]
Sent: Thursday, December 12, 2002 6:08 PM
To: asp_discuss
Subject: [asp_discuss] Check Box
I populate a recordset of only the "goodies" from a an Access db.
A table lists them all with a checkbox first, then a description of the
goody, then it's cost.
The user checks which goddies they want, and then submit the form.
The resulting page shows only the goodies that were checked off with their
description and cost. I've tried everything. Do Until, For Each Next, etc.
What do i use for the checkbox name and value on the preceding page?
exactly how do i request the checked items on the next page and also show
the descrip and cost?
Thank you
|
|
 |