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

Cflocation or page redirects

Explorer ,
Jan 10, 2013 Jan 10, 2013

Copy link to clipboard

Copied

I have a page that edits a database called (edit_record.cfm). The link from page A will go to the edit page that will allow for changes. After the update to the database from the (update_record.cfm), my cflocation tag will go back to page A. However right before I submit my finished records to my manager on my (email_review.cfm) page, I can click on each record to edit one last time. which when clicked would go to the same (edit_record.cfm).

What i want to do is to have a have my cflocation go to any of my previous pages when my database updates regardless if the previous page is my (edit_record.cfm) or (email_review.cfm)

Views

1.3K

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 ,
Jan 10, 2013 Jan 10, 2013

Copy link to clipboard

Copied

When either edit_record.cfm or email_review.cfm loads, set an input type="hidden" field called "returnTo" and give it a value of #cgi.script_name#.  After the database stuff, CFLOCATION to that form field value.

^_^

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 ,
Jan 10, 2013 Jan 10, 2013

Copy link to clipboard

Copied

Regarding, "What i want to do is to have a have my cflocation go to any of my previous pages"

You can't.  You have to go to a specifc page.  If there is conditional logic involved, that's a different story.  Also, if you want to pick a previous page at random, that's also possible although it seems rather silly.

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
Participant ,
Jan 10, 2013 Jan 10, 2013

Copy link to clipboard

Copied

If you want it to return to the page that called it try this:

<cflocation url="#cgi.http_referer#>

the referer is the page that called your current page.

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
Participant ,
Jan 10, 2013 Jan 10, 2013

Copy link to clipboard

Copied

LATEST

if you dump the <cfdump var="#cgi#"> you will find all sorts of goodies in there.

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