ANYONE HAVE A CLUE?????????

Results 1 to 5 of 5

Thread: ANYONE HAVE A CLUE?????????

  1. #1
    Join Date
    Dec 1969
    Posts
    730

    Default ANYONE HAVE A CLUE?????????

    What I am trying to do is delete a item from a list that is being pulled from the database in a loop. I have a delete button for each item to be deleted from the list. What it is trying to do is delete every item. How can I prevent this from happening?

  2. #2
    Jason Miller Guest

    Default RE: ANYONE HAVE A CLUE?????????

    Well, at a guess (due to lack of a full explanation), I&#039d say the server can&#039t tell one submit button apart from any other. Try giving them appropriate names, then you can say something to the effect of:<BR><BR> if not isBlank(thisSubmit) then do what I meant to do<BR><BR>(note that isBlank checks isNull, isEmpty, and the size of the string after a trim() and returns true or false).

  3. #3
    Join Date
    Dec 1969
    Posts
    730

    Default RE: ANYONE HAVE A CLUE?????????

    So how do I make a unique submit button for each item. I am using a While loop. Should I use a different kind of loop.<BR>

  4. #4
    Ibrahim Hamouda Guest

    Default RE: ANYONE HAVE A CLUE?????????

    Ok Why you don&#039t forget about the buttons, and use a checkbox instead of it (inside the loop). the value for the checkbox is the ID of the column you want to delete. and the name for all of them is "chk1"<BR><BR>then<BR><BR>for each entry in Request.Foorm("Chk1")<BR>strSQL="Delete TABLENAME where ID=&#039"& entry &"&#039"<BR>Next<BR><BR>Works fine for me in different components


  5. #5
    Join Date
    Dec 1969
    Posts
    730

    Default RE: ANYONE HAVE A CLUE?????????

    Thanks that is now working, I really appreciate the help. I am facing one more problem. It will delete the item from the database, but I need to force a refresh on the page.

Posting Permissions

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