p2p.wrox.com Forums

Need to download code?

View our list of code downloads.

  Return to Index  

proasp_codeclinic thread: Capturing info based on clicking of checkboxes

Message #1 by "Vinod K S" <srinivas_kvinod@u...> on Thu, 24 Aug 2000 9:20:57
--- page1.asp ---

Do while not objRS.EOF
<input type="checkbox" value="<%=objRS("tableID")%>" name="delete">
<% =objRS("field1")%><br>

This will write out a whole heap of checkboxes with the value being set to
the recordID.

--- page2.asp ---

If Request.Form("delete").Count > 0 then
    strSQL = "DELETE FROM table1 "
    strSQL = strSQL & "WHERE tableID IN " & Request.Form("delete")

End if

Of course you should check that each item in Request.Form("delete") is
numeric, eg:
For each x in Request.Form("Delete")
    ' call isNumeric function


----- Original Message -----
From: "Vinod K S" <srinivas_kvinod@u...>
To: "Code Clinic" <proasp_codeclinic@p...>
Sent: Thursday, August 24, 2000 9:20 AM
Subject: [proasp_codeclinic] Capturing info based on clicking of checkboxes

>       I have a screen with checkboxes along side the items in the tabular
> form. When the user selects the items on the checkbox and then clicks
> DeleteItems button. The items are to be deleted.
>       If i have a Delet.asp file, how do i associate the click of the
> checkbox with the item selected.
> ---
> You are currently subscribed to proasp_codeclinic.

  Return to Index