Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bring user back to certain position after delete

Status
Not open for further replies.

DebbieDavis

Programmer
Jun 7, 2002
146
US
Hello, I've been thinking out of the box in this one and probably need some help. There is a list of stuff with a delete icon next to each entry. User clicks delete, this removes the item, then I want the user to be able to return to the same area. I'm working on it but somebody out there might have a great idea I haven't thought of. The lists are long so it would be a convenience for the user not have to scroll all the way down again. Thanks in advance.
Code:
do while not items.eof
response.write "<tr><td>" & items("item_no") & "<td><a href='?delentry=" & items("line_no") & "'>delete</a>"
items.movenext
loop
Code:
SQL="delete from items where ln=" & request.querystring("delentry")
objConn.execute(SQL)
response.redirect "items.asp"

Maybe put in an anchor for each line number then after the delete return to the same line number minus one or something like that? Thanks for your thoughts.
 
Yes, the anchor would work, just pass the anchor id value aloing with the submit and you can then redirect back to that point in the page....




Bastien

Cat, the other other white meat
 
Thanks, Bastien. That's what I ended up doing and it's working properly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top