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

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="<%response.Write "recount"
& CoCount%>" value="<%=idx%>" >

with the following values below:

<input type=hidden name="recount" value=<%=idx%>>
<input type=hidden name="contactname"
value="<%=oDodgeCos3("f_person") %>" id=hidden1>
<input type=hidden name="drnum" value="<%=request("dr_num")%>"
id=hidden2>
<input type=hidden name="companyname"
value="<%=oDodgeCos3("f_comp_name")%>" id = hidden3>
<input type=hidden name="address"
value="<%=oDodgeCos3("f_addr1")%>" id=hidden4>
<input type=hidden name="city"
value="<%=oDodgeCos3("f_city")%>" id=hidden5>
<input type=hidden name="state"
value="<%=oDodgeCos3("f_state")%>" id=hidden6>
<input type=hidden name="zip" value="<%=oDodgeCos3("f_zip")%>"
id=hidden7>
<input type=hidden name="phone"
value="<%=oDodgeCos3("f_phone")%>" id=hidden8>
<input type=hidden name="fax"
value="<%=oDodgeCos3("f_fax_nbr")%>" 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 1510

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="<%response.Write "recount"
& CoCount%>" value="<%=idx%>" >

with the following values below:

<input type=hidden name="recount" value=<%=idx%>>
<input type=hidden name="contactname"
value="<%=oDodgeCos3("f_person") %>" id=hidden1>
<input type=hidden name="drnum" value="<%=request("dr_num")%>"
id=hidden2>
<input type=hidden name="companyname"
value="<%=oDodgeCos3("f_comp_name")%>" id = hidden3>
<input type=hidden name="address"
value="<%=oDodgeCos3("f_addr1")%>" id=hidden4>
<input type=hidden name="city"
value="<%=oDodgeCos3("f_city")%>" id=hidden5>
<input type=hidden name="state"
value="<%=oDodgeCos3("f_state")%>" id=hidden6>
<input type=hidden name="zip" value="<%=oDodgeCos3("f_zip")%>"
id=hidden7>
<input type=hidden name="phone"
value="<%=oDodgeCos3("f_phone")%>" id=hidden8>
<input type=hidden name="fax"
value="<%=oDodgeCos3("f_fax_nbr")%>" 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="<%response.Write "recount"
& CoCount%>" value="<%=idx%>" >

with the following values below:

<input type=hidden name="recount" value=<%=idx%>>
<input type=hidden name="contactname"
value="<%=oDodgeCos3("f_person") %>" id=hidden1>
<input type=hidden name="drnum" value="<%=request("dr_num")%>"
id=hidden2>
<input type=hidden name="companyname"
value="<%=oDodgeCos3("f_comp_name")%>" id = hidden3>
<input type=hidden name="address"
value="<%=oDodgeCos3("f_addr1")%>" id=hidden4>
<input type=hidden name="city"
value="<%=oDodgeCos3("f_city")%>" id=hidden5>
<input type=hidden name="state"
value="<%=oDodgeCos3("f_state")%>" id=hidden6>
<input type=hidden name="zip" value="<%=oDodgeCos3("f_zip")%>"
id=hidden7>
<input type=hidden name="phone"
value="<%=oDodgeCos3("f_phone")%>" id=hidden8>
<input type=hidden name="fax"
value="<%=oDodgeCos3("f_fax_nbr")%>" 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("checkbox") will
give you 1,2,4,6,9 (if those were the selected checkboxes).

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

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

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
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: ...
2
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...
1
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...
0
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...
0
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...
3
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_" +...
2
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...
2
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...
5
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 ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...

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.