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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

focus( ) to a bookmark on a page

Status
Not open for further replies.

budapestnori

Technical User
Jan 15, 2004
33
HU
I have an asp script which generates a page that outputs records from database. As it does so, I generate a bookmark for each item. Viewers are then able to click an "on/off" link which calls an external script which updates the database and then returns the viewer to the original page. BUT, in doing so, they are returned to the "top" of the list, and not the place where they clicked the "on/off". To achieve this, I want the (asp) script to pass back the id number of the record, and on the original page, pass it at the end of the code to a javascript function call, which when executed, will focus on the bookmark in the page, thus returning them to the exact spot they were when they began.
 
in your original page (eg Page1.asp)...
Code:
<A NAME="bookmark1"></A>
<A HREF="update.asp?id=whatever&bookmark=bookmark1">your on/off link</A>
and in your update.asp page...
Code:
' your update code here
Response.Redirect "Page1.asp#" & Request.QueryString("bookmark")

Tony
reddot.gif WIDTH=500 HEIGHT=2 VSPACE=3

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top