Help - 3 action buttons on each record

M

Marcelo

Hi, I have the following need: I list a table from an access database but
cannot interact with each record.
At the html page I display all records, one field (field1) from and 3
buttons for each record so to:
Button 1) Accept: Sets 1 on field 2 on that record
Button 2) Reject: Sets 0 on field 2 on that record
Button 3) Delete: Deletes that record

That'd be:
-------------Record 1---------------
Message: Hello 1!!!
ACCEPT - REJECT - DELETE
-------------Record 2---------------
Message: Hello 2!!!
ACCEPT - REJECT - DELETE
-------------Record 3---------------
Message: Hello 3!!!
ACCEPT - REJECT - DELETE
-------------Record 4---------------
Message: Hello 4!!!
ACCEPT - REJECT - DELETE

For example I press delete button and it'll have to delete that record:
-------------Record 1---------------
Message: Hello 1!!!
ACCEPT - REJECT - DELETE
-------------Record 3---------------
Message: Hello 3!!!
ACCEPT - REJECT - DELETE
-------------Record 4---------------
Message: Hello 4!!!
ACCEPT - REJECT - DELETE


Actually, I'm just displaying these records but I don't know how to do
different actions for each button for each field.

This is the code:

<form name="form" method="post" action="add_to_guestbook.asp">
<table width="610" border="0" align="center" cellpadding="0"
cellspacing="0">
<%
while not RS.eof
%>
<tr>
<td>
<%Response.Write RS("MessageText")%>
</td>
</tr>
<tr>
<td>
<%Response.Write RS("MessageFrom")%> - <%Response.Write
RS("MessageDate")%>
</td>

Hope you can help me,

Marcelo.
<tr>
<input type="button" name="btnAccept" value="Accept">
<input type="button" name="btnReject" value="Reject">
<input type="button" name="btnDelete" value="Delete"></td>
</tr>
<%RS.movenext%>
<%wend
set conn=Nothing
set RS=Nothing
%>
</table></td>
</tr>
</form>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top