Add
<form method="post" action="deleteagents.asp">
before the
<table width="780" border="0" cellspacing="0" cellpadding="0" align="center">
and add
</form>
after the
</table>
Change
<a href="#" onClick="Go_to_Url('<%=rs(
to
<input type="checkbox" value="<%=rs(0)%>">
and add a button somewhere before </form>
<input type="submit" value="Delete" onclick="return ConfirmDelete();">
and add a function
<Script language="JavaScript">
function ConfirmDelete()
{
var flag=confirm("Are you sure to delete the selected listings?");
return flag;
}
</Script>
then in deleteagents.asp change
Sql="Delete from member where userid="& userid
to
Sql="Delete from member where userid in (" & userid & ")"
Main Topics
Browse All Topics





by: peterxlanePosted on 2006-10-06 at 07:17:18ID: 17676530
This is the basic premise:
)
<form method="post">
<table border="1" cellpadding="2" cellspacing="0">
<tr>
<td>One</td>
<td><input type="checkbox" value="1" name="userid" /></td>
</tr>
<tr>
<td>Two</td>
<td><input type="checkbox" value="2" name="userid" /></td>
</tr>
<tr>
<td>Three</td>
<td><input type="checkbox" value="3" name="userid" /></td>
</tr>
</table>
<input type="submit" value="Submit" name="cmdSubmit" />
</form>
<%
If Request.Form <> "" Then
strDeleteIDs = Request.Form("userid")
arrOfIDs = Split(strDeleteIDs, ",")
For Each X in arrOfIDs
strDeleteSQL = "DELETE FROM Member WHERE userid = " & X
'Conn.Execute(strDeleteSQL
Response.Write strDeleteSQL & "<br />"
Next
End If
%>