473,765 Members | 1,956 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Checkbox Issues

Hello,

I have the following problem with the checkbox. The issue seems to be
that when I click on the following checkbox:

<input type= checkbox id="checkbox1" name="<%respons e.Write "recount"
& CoCount%>" value="<%=idx%> " >

with the following values below:

<input type=hidden name="recount" value=<%=idx%>>
<input type=hidden name="contactna me"
value="<%=oDodg eCos3("f_person ") %>" id=hidden1>
<input type=hidden name="drnum" value="<%=reque st("dr_num")%> "
id=hidden2>
<input type=hidden name="companyna me"
value="<%=oDodg eCos3("f_comp_n ame")%>" id = hidden3>
<input type=hidden name="address"
value="<%=oDodg eCos3("f_addr1" )%>" id=hidden4>
<input type=hidden name="city"
value="<%=oDodg eCos3("f_city") %>" id=hidden5>
<input type=hidden name="state"
value="<%=oDodg eCos3("f_state" )%>" id=hidden6>
<input type=hidden name="zip" value="<%=oDodg eCos3("f_zip")% >"
id=hidden7>
<input type=hidden name="phone"
value="<%=oDodg eCos3("f_phone" )%>" id=hidden8>
<input type=hidden name="fax"
value="<%=oDodg eCos3("f_fax_nb r")%>" id=hidden9>
The problem is that when I click on the box, it seems that the all
values is being passed over to the next page.

How would I have the values passed over based upon the checkbox that
the user select?

Thanks!
Kevin Davis

May 8 '06 #1
4 1524

Kevin Davis wrote:
Hello,

I have the following problem with the checkbox. The issue seems to be
that when I click on the following checkbox:

<input type= checkbox id="checkbox1" name="<%respons e.Write "recount"
& CoCount%>" value="<%=idx%> " >

with the following values below:

<input type=hidden name="recount" value=<%=idx%>>
<input type=hidden name="contactna me"
value="<%=oDodg eCos3("f_person ") %>" id=hidden1>
<input type=hidden name="drnum" value="<%=reque st("dr_num")%> "
id=hidden2>
<input type=hidden name="companyna me"
value="<%=oDodg eCos3("f_comp_n ame")%>" id = hidden3>
<input type=hidden name="address"
value="<%=oDodg eCos3("f_addr1" )%>" id=hidden4>
<input type=hidden name="city"
value="<%=oDodg eCos3("f_city") %>" id=hidden5>
<input type=hidden name="state"
value="<%=oDodg eCos3("f_state" )%>" id=hidden6>
<input type=hidden name="zip" value="<%=oDodg eCos3("f_zip")% >"
id=hidden7>
<input type=hidden name="phone"
value="<%=oDodg eCos3("f_phone" )%>" id=hidden8>
<input type=hidden name="fax"
value="<%=oDodg eCos3("f_fax_nb r")%>" id=hidden9>
The problem is that when I click on the box, it seems that the all
values is being passed over to the next page.

How would I have the values passed over based upon the checkbox that
the user select?

Thanks!
Kevin Davis


What does your second page do? Your requirement isn't entirely clear.

--
Mike Brind

May 10 '06 #2
Basically on the next page there is a form that stores the information
based upon the information. For example, I would click on both records
and I would only like to see the first record first then the next
record an so on. Basically the second page allows the user to modify
the data.

May 10 '06 #3

Kevin Davis wrote:
Hello,

I have the following problem with the checkbox. The issue seems to be
that when I click on the following checkbox:

<input type= checkbox id="checkbox1" name="<%respons e.Write "recount"
& CoCount%>" value="<%=idx%> " >

with the following values below:

<input type=hidden name="recount" value=<%=idx%>>
<input type=hidden name="contactna me"
value="<%=oDodg eCos3("f_person ") %>" id=hidden1>
<input type=hidden name="drnum" value="<%=reque st("dr_num")%> "
id=hidden2>
<input type=hidden name="companyna me"
value="<%=oDodg eCos3("f_comp_n ame")%>" id = hidden3>
<input type=hidden name="address"
value="<%=oDodg eCos3("f_addr1" )%>" id=hidden4>
<input type=hidden name="city"
value="<%=oDodg eCos3("f_city") %>" id=hidden5>
<input type=hidden name="state"
value="<%=oDodg eCos3("f_state" )%>" id=hidden6>
<input type=hidden name="zip" value="<%=oDodg eCos3("f_zip")% >"
id=hidden7>
<input type=hidden name="phone"
value="<%=oDodg eCos3("f_phone" )%>" id=hidden8>
<input type=hidden name="fax"
value="<%=oDodg eCos3("f_fax_nb r")%>" id=hidden9>
The problem is that when I click on the box, it seems that the all
values is being passed over to the next page.


That's how it should work. All values on the form get passed to the
next page. It's up to your code on the next page to determine what
happens if a certain checkbox was checked.

May 10 '06 #4

Kevin Davis wrote:
Basically on the next page there is a form that stores the information
based upon the information. For example, I would click on both records
and I would only like to see the first record first then the next
record an so on. Basically the second page allows the user to modify
the data.


Your reply is even more confusing than the original :-)

Let's have a stab at this: The first page is supposed to represent all
records that can be edited, with checkboxes by each one so that the
user can tick the checkboxes against the records they want to update.
This information is passed over to the next page, presenting the
selected records in editable format. The second page then processes
any changes made to any of the records. Is that right?

If it is, then you do not need all the hidden fields on the first page.
Just the ID number for each record will do as the value for the
checkbox - making sure that the checkboxes all share the same name.
All the selected checkboxes will be passed in the Form collection as a
comma-separated string eg: Response.Write Request.Form("c heckbox") will
give you 1,2,4,6,9 (if those were the selected checkboxes).

After validating Request.Form("c heckbox") you just need to use the SQL
IN clause to select those records:

sql = "SELECT fields FROM table WHERE ID IN(" &
Request.Form("c heckbox") & ")"

What will increase the difficulty of your task on the second page is
presenting all records in an editable format. You will have to append
the form field names with a counter so you can identify which, say,
surname belongs to which record being updated.

Hope I've guessed what you are trying to do correctly...

--
Mike Brind

May 10 '06 #5

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

Similar topics

2
1465
by: JIM | last post by:
Hello, I would like to solve the following problem : I've a web site with ex. 5 checkboxes Each checkbox contains the name of a certain task ex. asp:Checkbox 1: Task 1 asp:Checkbox 2: Task 2 ...
2
3494
by: Advo | last post by:
Basically, ive got information in a table for the layout purposes, as its text for a questionnaire What i Need, is for instance when the user click a radio button, that information can be hidden. I tried <div id="myarea" style="visibility:hidden"><STRONG><font color="#4475AA"Question 2:</font></STRONG></divetc
1
1059
by: glenn | last post by:
Hi folks, I have a column in a DataGrid that is for checkboxes. I want to click on a checkbox and have that event post that the checkbox is now checked so that if I refresh the screen or revisit the page later, I will still see the checkbox checked. I am trying to use the CheckChanged event handler for a Checkbox without much success.
0
1463
by: dotnet dude | last post by:
I am creating a DataGrid control (ASP.NET 1.) with few bound columns and one template column in which i want to display CheckBox. So for each row in datagrid some databound fields and a checkbox column. When a checkbox is selected, it indicates that particular row is selected. The checkbox selection I want to do is through javascript to improve the performance of the application. How do I design such datagrid which allows me to do...
0
800
by: =?Utf-8?B?VGVk?= | last post by:
I have an application with a checkbox, when I change the checked property of the box from False to True, just this call takes 0.144 seconds. When I change the checked property of the box from True to False, it takes 0.000 seconds. Now I don't understand why. Its only a fraction of a second, but in my application this does matter. Just to make sure that there were no other issues, I created a new application, with only a checkbox, and...
3
1912
by: Raymond | last post by:
I am having a problem about the dynamic checkbox Private Sub Page_Load Me.NumberOfChkControls = 0 Dim cbCheckBox As New CheckBox cbCheckBox.Text = .Id.ToString cbCheckBox.ID = "ControlID_" + NumberOfChkControls.ToString NumberOfChkControls = NumberOfChkControls + 1 cbCheckBox.EnableViewState = True dimNewTableCell.Controls.Add(cbCheckBox) dimNewTableRow.Cells.Add(dimNewTableCell)
2
4289
by: mrstrong | last post by:
Gday, I have a datagridview that I am creating the columns programatically which all seems to work fine. I have a couple of dropdown boxes, so I have set the editMode= EditOnEnter. Now my checkboxes dont seem to work, and the datagridview throws a dataerror when I try to leave the cell after trying to check/uncheck the checkbox?!
2
6126
by: mrstrong | last post by:
Gday, Why would all my checkboxes inside a datagridview stop working (ie checked state not updating when user clicks) when the datagridview's editmode property is changed to "EditOnEnter"? It seems to return an error: "Formatted Value of the cell has wrong type". It works fine when the datagridview's editmode property is
5
10360
by: =?Utf-8?B?Y2hlY2tyYWlzZXJAY29tbXVuaXR5Lm5vc3BhbQ== | last post by:
I have a VS 2008 ASP.NET webform that has a reportview tag on it, accessing an .RLDC report in local report. The columns for the report are essentially: Month Item #1 Item#2 Item#3 I would like to add a checkbox or dropdown control to the .RLDC and have Item #1, Item #2, or Item #3 display conditionally based on a checkbox being clicked or a dropdown value being selected.
0
9568
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9399
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10163
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9957
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9835
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8832
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7379
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.