I have a problem more to do with style than ability; I can solve this
problem in a number of ways, but I'm keen to find the best way of doing
this...
We have a facility on our intranet where users can log problems, comments &
suggestions about the site to a DB.
I'm building a page that lists the outstanding entries, and allows use to
mark any number of entries as being 'done'
That is, we have a number of rows, with the last field in each row being a
checkbox to indicate the entry has been dealt with. At the end, there is an
Update button which submits the form.
The question is.. how to handle this...?
The best solution I have thought of so far is to use the record ID as the ID
for each checkbox. Then to Split() the resulting Request.Form into an array,
loop through the array picking out the record IDs.
It's not a bad solution, but I figured this must be a fairly common
procedure and that somebody might have a slicker way of doing it...
Any ideas?
Chris 4 2036
Name all the checkboxes the same, and use the ID number for the values, as
so:
<input name="chkID" value="1">
<input name="chkID" value="5">
<input name="chkID" value="13">
<input name="chkID" value="19">
Then on the page that processes, update them all with one SQL statement.
sToUpdate = Request.Form("chkID")
''will return a string like 1, 5, 13, 19
If Len(sToUpdate) > 0 Then
sSQL = "UPDATE TheTable SET TheColumn=TheValue WHERE [ID] IN (" &
sToUpdate & ")"
''create connection here
YourADOConnection.Execute sSQL
End If
Ray at work
"CJM" <cj*****@yahoo.co.uk> wrote in message
news:O7**************@TK2MSFTNGP11.phx.gbl... I have a problem more to do with style than ability; I can solve this problem in a number of ways, but I'm keen to find the best way of doing this...
We have a facility on our intranet where users can log problems, comments
& suggestions about the site to a DB. I'm building a page that lists the outstanding entries, and allows use to mark any number of entries as being 'done'
That is, we have a number of rows, with the last field in each row being a checkbox to indicate the entry has been dealt with. At the end, there is
an Update button which submits the form.
The question is.. how to handle this...?
The best solution I have thought of so far is to use the record ID as the
ID for each checkbox. Then to Split() the resulting Request.Form into an
array, loop through the array picking out the record IDs.
It's not a bad solution, but I figured this must be a fairly common procedure and that somebody might have a slicker way of doing it...
Any ideas?
Chris
Don't forget to update the values that were unchecked. That is, if a
checkbox had been checked, and then it was unchecked, it would not be
reflected in Ray's solution.
"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:ex**************@TK2MSFTNGP12.phx.gbl... Name all the checkboxes the same, and use the ID number for the values, as so:
<input name="chkID" value="1"> <input name="chkID" value="5"> <input name="chkID" value="13"> <input name="chkID" value="19">
Then on the page that processes, update them all with one SQL statement.
sToUpdate = Request.Form("chkID") ''will return a string like 1, 5, 13, 19
If Len(sToUpdate) > 0 Then sSQL = "UPDATE TheTable SET TheColumn=TheValue WHERE [ID] IN (" & sToUpdate & ")" ''create connection here YourADOConnection.Execute sSQL End If
Ray at work
"CJM" <cj*****@yahoo.co.uk> wrote in message news:O7**************@TK2MSFTNGP11.phx.gbl... I have a problem more to do with style than ability; I can solve this problem in a number of ways, but I'm keen to find the best way of doing this...
We have a facility on our intranet where users can log problems,
comments & suggestions about the site to a DB. I'm building a page that lists the outstanding entries, and allows use
to mark any number of entries as being 'done'
That is, we have a number of rows, with the last field in each row being
a checkbox to indicate the entry has been dealt with. At the end, there is an Update button which submits the form.
The question is.. how to handle this...?
The best solution I have thought of so far is to use the record ID as
the ID for each checkbox. Then to Split() the resulting Request.Form into an array, loop through the array picking out the record IDs.
It's not a bad solution, but I figured this must be a fairly common procedure and that somebody might have a slicker way of doing it...
Any ideas?
Chris
Fair point, but in this instance once an entry has been marked as 'done' is
disappears... there is no unchecking capability.
Thanks
"Tom B" <sh*****@hotmail.com> wrote in message
news:eA**************@tk2msftngp13.phx.gbl... Don't forget to update the values that were unchecked. That is, if a checkbox had been checked, and then it was unchecked, it would not be reflected in Ray's solution. "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message news:ex**************@TK2MSFTNGP12.phx.gbl... Name all the checkboxes the same, and use the ID number for the values,
as so:
<input name="chkID" value="1"> <input name="chkID" value="5"> <input name="chkID" value="13"> <input name="chkID" value="19">
Then on the page that processes, update them all with one SQL statement.
sToUpdate = Request.Form("chkID") ''will return a string like 1, 5, 13, 19
If Len(sToUpdate) > 0 Then sSQL = "UPDATE TheTable SET TheColumn=TheValue WHERE [ID] IN (" & sToUpdate & ")" ''create connection here YourADOConnection.Execute sSQL End If
Ray at work
"CJM" <cj*****@yahoo.co.uk> wrote in message news:O7**************@TK2MSFTNGP11.phx.gbl... I have a problem more to do with style than ability; I can solve this problem in a number of ways, but I'm keen to find the best way of
doing this...
We have a facility on our intranet where users can log problems, comments & suggestions about the site to a DB. I'm building a page that lists the outstanding entries, and allows use to mark any number of entries as being 'done'
That is, we have a number of rows, with the last field in each row
being a checkbox to indicate the entry has been dealt with. At the end, there
is an Update button which submits the form.
The question is.. how to handle this...?
The best solution I have thought of so far is to use the record ID as the ID for each checkbox. Then to Split() the resulting Request.Form into an array, loop through the array picking out the record IDs.
It's not a bad solution, but I figured this must be a fairly common procedure and that somebody might have a slicker way of doing it...
Any ideas?
Chris
That's exactly what I was looking for.
Glad I asked now..
tx
Chris
"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:ex**************@TK2MSFTNGP12.phx.gbl... Name all the checkboxes the same, and use the ID number for the values, as so:
<input name="chkID" value="1"> <input name="chkID" value="5"> <input name="chkID" value="13"> <input name="chkID" value="19">
Then on the page that processes, update them all with one SQL statement.
sToUpdate = Request.Form("chkID") ''will return a string like 1, 5, 13, 19
If Len(sToUpdate) > 0 Then sSQL = "UPDATE TheTable SET TheColumn=TheValue WHERE [ID] IN (" & sToUpdate & ")" ''create connection here YourADOConnection.Execute sSQL End If
Ray at work
"CJM" <cj*****@yahoo.co.uk> wrote in message news:O7**************@TK2MSFTNGP11.phx.gbl... I have a problem more to do with style than ability; I can solve this problem in a number of ways, but I'm keen to find the best way of doing this...
We have a facility on our intranet where users can log problems,
comments & suggestions about the site to a DB. I'm building a page that lists the outstanding entries, and allows use
to mark any number of entries as being 'done'
That is, we have a number of rows, with the last field in each row being
a checkbox to indicate the entry has been dealt with. At the end, there is an Update button which submits the form.
The question is.. how to handle this...?
The best solution I have thought of so far is to use the record ID as
the ID for each checkbox. Then to Split() the resulting Request.Form into an array, loop through the array picking out the record IDs.
It's not a bad solution, but I figured this must be a fairly common procedure and that somebody might have a slicker way of doing it...
Any ideas?
Chris
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Craig Keightley |
last post by:
I have the following form
<FORM NAME="form1" METHOD="POST">
<?php do { ?>
<input name="approve" type="checkbox" id="approve" value="<?php echo
$row_rs; ?>">
<select name="select">
<option...
|
by: Duke Hamacher |
last post by:
Hello:
This title is a little ambiguous but this is an interesting puzzle.
Lets's say we have a JSP page with a form. The ActionForm associated
with this form has, say, 4 String properities. ...
|
by: Display Name |
last post by:
the customer I'm developing a site for uses a canned form-parsing page that
allows her to have an email subscription opt-in page add emails to a list
she can manage using a link that you point your...
|
by: Don |
last post by:
I have a need to submit a form, but don't need the user to click on a button. How do I do this? Is
there some way, using JavaScript, to setup a <form> tag to do this?
Thanks,
Don
----==...
|
by: misscrf |
last post by:
I am currently working on a database, in 3rd normal form, which is for
candidates who apply for a job with the law firm that I
workd for. My issue is with good form design.
I have a main...
|
by: ApexData |
last post by:
I have 2 tables: Table1 and Table2.
Neither one has a primary key because each table will only have
1-record.
My form is a SingleForm unbound with tabs (my desire here).
Using this form, in...
|
by: =?Utf-8?B?TG9zdEluTUQ=?= |
last post by:
Hi All :)
I'm converting VB6 using True DBGrid Pro 8.0 to VB2005 using DataGridView.
True DBGrid has a MultipleLines property that controls whether individual
records span multiple lines. Is...
|
by: Neil |
last post by:
"lyle" <lyle.fairfield@gmail.comwrote in message
news:48c3dde7-07bd-48b8-91c3-e157b703f92b@f3g2000hsg.googlegroups.com...
Question for you. I'm doing something similar, only, instead of opening...
|
by: bonneylake |
last post by:
Hey Everyone,
Well this is my first time asking a question on here so please forgive me if i post
my question in the wrong section.
What i am trying to do is upload multiple files like gmail...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
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...
|
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,...
|
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...
|
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,...
|
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...
|
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...
|
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,...
| |