Simple Question

Results 1 to 2 of 2

Thread: Simple Question

  1. #1
    Join Date
    Dec 1969

    Default Simple Question

    Hi,<BR>As a part of a project, am creating an online shopping mall using asp.I am at present in the order confirmation page, where we can delete an selected item and update the shopping cart.I have kept a check box next to each of the item that a customer will order.If he/she decides to remove the item, they will have to tick the check box and click onto the delete item icon.This automatically goes into another asp page, where I see whether any of the check box is ticked, if yes I remove that item from that customer&#039;s table. I am having trouble in seeing whether that check box is ticked or not.I have placed a part of my code below.It would be really kind if someone could help me out.<BR><BR>This is how I have created the check box:<BR>Response.Write("&#060;P align=center&#062;&#060;INPUT id=checkbox1 name=checkbox1 type=checkbox &#062;&#060;/P&#062;&#060;/TD&#062;")<BR><BR>After clicking on the delete item, it goes to another asp page and the code in this page is:<BR><BR><BR>check=Trim( Request.Form("checkbox1") )<BR> <BR>for i=1 to count<BR>&#039;The variable count tells u the no of items present in the shopping cart<BR>if (check=true) then<BR> sql1 = "DELETE FROM Jcp where Name=&#039;"&strtemp&"&#039; and Product=&#039;"&product(count)&"&#039; and Quantity=&#039;"&quantity(count)&"&#039; "<BR> Set Recordset1 = Connection3.Execute(sql1)<BR> end if<BR>Next<BR>Thanks a Ton!!<BR>Raja

  2. #2
    Join Date
    Dec 1969

    Default Always

    The questions are always simple it&#039;s the answers that get difficult. <BR><BR>Your code = "if (check=true) then" and check=Trim( Request.Form("checkbox1") Why trim it?<BR><BR><BR>Maybe you could try:<BR><BR>checkbox1 = "" & Request.Form("checkbox1")<BR><BR>If checkbox1 &#060;&#062; "" Then

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts