Ask a Question related to ASP, Design and Development.
-
CJM #1
Submitting multiple record IDs via a form.
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
CJM Guest
-
Multiple emails when submitting a form?
Does anyone know whether or not you can have a form submit to multiple email address' when you submit a form? Especially when you distribute the... -
Submitting data from single tab using multiple tab form
I have a flash form with multiple tabs. When a submit button is pressed, however, I would like only the information from the current tab to go to... -
Record Insertion Form causes multiple entries
I'm using DMX with PHP / MySQL and the Record Insertion Form from the Application tab. I test the form and check the database only to find that... -
Use PDf fill in form in Website and submitting form info.
I feel like I'm 99% there, but I am missing something. I created the PDF form offline and tested submitting it. It works fine. When I upload and... -
How do you delete a record form multiple tables
I have a dbase that has about 30 tables in it. How can I delete a record out of all of the tables without doing 30 DELETE statements? Example:... -
Ray at #2
Re: Submitting multiple record IDs via a form.
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" <cjmwork@yahoo.co.uk> wrote in message
news:O7d4wDXmDHA.3688@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, commentsan> 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 isID> 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 thearray,> for each checkbox. Then to Split() the resulting Request.Form into an> 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
>
>
>
>
Ray at Guest
-
Tom B #3
Re: Submitting multiple record IDs via a form.
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:exbxtGXmDHA.2200@TK2MSFTNGP12.phx.gbl...comments> 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" <cjmwork@yahoo.co.uk> wrote in message
> news:O7d4wDXmDHA.3688@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,to> &> > suggestions about the site to a DB.
> > I'm building a page that lists the outstanding entries, and allows usea> > mark any number of entries as being 'done'
> >
> > That is, we have a number of rows, with the last field in each row beingthe> an> > checkbox to indicate the entry has been dealt with. At the end, there is> > 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> ID> array,> > for each checkbox. Then to Split() the resulting Request.Form into an>> > 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
> >
> >
> >
> >
>
Tom B Guest
-
CJM #4
Re: Submitting multiple record IDs via a form.
Fair point, but in this instance once an entry has been marked as 'done' is
disappears... there is no unchecking capability.
Thanks
"Tom B" <shuckle@hotmail.com> wrote in message
news:eAzVoMXmDHA.3312@tk2msftngp13.phx.gbl...as> 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:exbxtGXmDHA.2200@TK2MSFTNGP12.phx.gbl...> > Name all the checkboxes the same, and use the ID number for the values,doing> > 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" <cjmwork@yahoo.co.uk> wrote in message
> > news:O7d4wDXmDHA.3688@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 ofbeing> comments> > > this...
> > >
> > > We have a facility on our intranet where users can log problems,> to> > &> > > suggestions about the site to a DB.
> > > I'm building a page that lists the outstanding entries, and allows use> > > mark any number of entries as being 'done'
> > >
> > > That is, we have a number of rows, with the last field in each rowis> a> > > checkbox to indicate the entry has been dealt with. At the end, there> the> > 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>> > ID> > array,> > > for each checkbox. Then to Split() the resulting Request.Form into an> >> > > 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
> > >
> > >
> > >
> > >
> >
>
CJM Guest
-
CJM #5
Re: Submitting multiple record IDs via a form.
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:exbxtGXmDHA.2200@TK2MSFTNGP12.phx.gbl...comments> 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" <cjmwork@yahoo.co.uk> wrote in message
> news:O7d4wDXmDHA.3688@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,to> &> > suggestions about the site to a DB.
> > I'm building a page that lists the outstanding entries, and allows usea> > mark any number of entries as being 'done'
> >
> > That is, we have a number of rows, with the last field in each row beingthe> an> > checkbox to indicate the entry has been dealt with. At the end, there is> > 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> ID> array,> > for each checkbox. Then to Split() the resulting Request.Form into an>> > 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
> >
> >
> >
> >
>
CJM Guest



Reply With Quote

