• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Returning user to correct page position

New Here ,
Aug 09, 2007 Aug 09, 2007

Copy link to clipboard

Copied

I have a list of links that go down the page, all the links are pulled from a database. When a user clicks on a link it goes to a query page and then returns the user to that list. The problem is that when the query page returns the user ( via cflocation) to the top of the page. I would like them to be returned to the last linked they clicked.

Anyone have any trick for doing this, many thanks!!!

I have a way of doing this with onfocus but it uses a # and of course thats not going to work inside a cfoutput
TOPICS
Advanced techniques

Views

572

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 10, 2007 Aug 10, 2007

Copy link to clipboard

Copied

just use ## instead of # in the script if it is inside <cfoutput>

---
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 10, 2007 Aug 10, 2007

Copy link to clipboard

Copied

You can have # in cfoutput by escaping it with another #.. eg. <cfoutput>## </cfoutput> results as #

<cflocation> however likes to add CFTOKEN and stuff like that by default. So to make this solution work, you should also disable adding token within that cflocation. I guess that is not a problem, though.

So. <cflocation addtoken="false" url=" http://your.url/here.cfm?maybesome=parameters##theanchorhere">

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 10, 2007 Aug 10, 2007

Copy link to clipboard

Copied

Thankyou! that tip about the token closed the deal because other variables would not pass.

Great forum cant wait to contribute

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 10, 2007 Aug 10, 2007

Copy link to clipboard

Copied

Try using javascript window.history instead of cflocation.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 16, 2007 Aug 16, 2007

Copy link to clipboard

Copied

LATEST
CGI variable HTTP_REFERER also holds the value where u comes from.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation