|
 |
access_asp thread: Tracking what row on in asp
Message #1 by "sharon buggle" <s.buggle@w...> on Sat, 10 Nov 2001 14:43:28
|
|
Subject : Tracking what rows were changed Author : Sharon Date :
11/09/2001 7:27:00 PM
This is an asp page with 4 columns and 11 row table.
In the first two columns of the table the user enters two required fields
number1 and number2.
Then a button is clicked of course and it will return the records along
with a third field in the third col . In the fourth column there is a drop
down list that allows the user to change the third column's value.
Each of the rows has this drop down in the fourth column. if they change
something from the drop down list box and click SAVE
Here is the question :
HOW DO I KEEP TRACK OF WHAT ROW WAS CHANGED WHEN THEY CHOOSE SOMETHING
DIFFERENT IN THE DROP DOWN LIST BOX THATS ON EACH ROW?
What is the best way.
Thank you so very much
SB
Message #2 by "Zee Computer Consulting" <zee@t...> on Sat, 10 Nov 2001 20:19:25 -0800
|
|
The Wrox book, *** IE5 Dynamic HTML ***, may be helpful here. Each
drop-down list SELECT tag could have its own ID attribute such as ID=DD1,
ID=DD2, ..., ID=DD11. You can then retrieve the ID attribute in scripted
client-side event code. Your SELECT tag would look something like this:
<select size='12' name='DropDown1' ID='DD1'>
.
.
.
</select>
Does this help? Should I elaborate?
----- Original Message -----
From: "sharon buggle" <s.buggle@w...>
To: "Access ASP" <access_asp@p...>
Sent: Saturday, November 10, 2001 2:43 PM
Subject: [access_asp] Tracking what row on in asp
> Subject : Tracking what rows were changed Author : Sharon Date :
> 11/09/2001 7:27:00 PM
>
> This is an asp page with 4 columns and 11 row table.
>
> In the first two columns of the table the user enters two required fields
> number1 and number2.
>
> Then a button is clicked of course and it will return the records along
> with a third field in the third col . In the fourth column there is a drop
> down list that allows the user to change the third column's value.
>
>
> Each of the rows has this drop down in the fourth column. if they change
> something from the drop down list box and click SAVE
>
> Here is the question :
>
> HOW DO I KEEP TRACK OF WHAT ROW WAS CHANGED WHEN THEY CHOOSE SOMETHING
> DIFFERENT IN THE DROP DOWN LIST BOX THATS ON EACH ROW?
>
> What is the best way.
>
>
> Thank you so very much
>
> SB
>
>
>
>
>
>
>
>
>
Message #3 by "sharon buggle" <s.buggle@w...> on Sun, 11 Nov 2001 17:47:28
|
|
> The Wrox book, *** IE5 Dynamic HTML ***, may be helpful here. Each
> drop-down list SELECT tag could have its own ID attribute such as ID=DD1,
> ID=DD2, ..., ID=DD11. You can then retrieve the ID attribute in scripted
> client-side event code. Your SELECT tag would look something like this:
>
> <select size='12' name='DropDown1' ID='DD1'>
> .
> .
> .
> </select>
>
>
> Does this help? Should I elaborate?
>
>
>
>
> ----- Original Message -----
> From: "sharon buggle" <s.buggle@w...>
> To: "Access ASP" <access_asp@p...>
Yes ,but if you could show me more on when they choose the id.
Thanks
> Sent: Saturday, November 10, 2001 2:43 PM
> Subject: [access_asp] Tracking what row on in asp
>
>
> > Subject : Tracking what rows were changed Author : Sharon Date :
> > 11/09/2001 7:27:00 PM
> >
> > This is an asp page with 4 columns and 11 row table.
> >
> > In the first two columns of the table the user enters two required
fields
> > number1 and number2.
> >
> > Then a button is clicked of course and it will return the records along
> > with a third field in the third col . In the fourth column there is a
drop
> > down list that allows the user to change the third column's value.
> >
> >
> > Each of the rows has this drop down in the fourth column. if they
change
> > something from the drop down list box and click SAVE
> >
> > Here is the question :
> >
> > HOW DO I KEEP TRACK OF WHAT ROW WAS CHANGED WHEN THEY CHOOSE SOMETHING
> > DIFFERENT IN THE DROP DOWN LIST BOX THATS ON EACH ROW?
> >
> > What is the best way.
> >
> >
> > Thank you so very much
> >
> > SB
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
Message #4 by "Ken Schaefer" <ken@a...> on Mon, 12 Nov 2001 14:14:32 +1100
|
|
You get the value of *all* of the select lists, and you compare it to the
value that you have stored currently.
TO create the select lists, you need to assign the ID of the record to the
select list, and you also need a separate list of all the IDs, eg
create a set of hidden form fields called ID. You create as many of these as
there are records, and you assign the RecordID to the *value* of this hidden
field:
<%
Do While Not objRS.EOF
Response.Write( _
"<input type=""hidden"" name=""ID"" value=""" & objRS("ID") & """>")
Next
%>
Next you create a set of select boxes, with the name being dependant on the
ID:
<%
Do While Not objRS.EOF
Response.Write( _
"<select name=""col4_" & objRS("ID") & """>")
Next
%>
Then, when the form is submitted, you iterate through the collection of ID
values, and find the corresponding chosen value in the col4_ collection:
<%
For Each key in Request.Form("ID")
Response.Write(x & " = " & Request.Form("col4_" & x))
Next
%>
which will retrive the value of the select list for each record that you
have.
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "sharon buggle" <s.buggle@w...>
Subject: [access_asp] Tracking what row on in asp
: Here is the question :
:
: HOW DO I KEEP TRACK OF WHAT ROW WAS CHANGED WHEN THEY CHOOSE SOMETHING
: DIFFERENT IN THE DROP DOWN LIST BOX THATS ON EACH ROW?
:
: What is the best way.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
 |