• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 156
  • Last Modified:

Redirection with CF

I think this is a simple one but I am not finding the tag that helps.  In ASP we have the ability to redirect to another page.  This basically would allow the page designer to mimic a back and forward or jump to a specific page automatically.  

What I am REALLY trying to accomplish should be simple.  I have a Post page that does some data base work and if no errors occur, I want to automatically jump to another page.
0
beregoth
Asked:
beregoth
1 Solution
 
bigbadbCommented:
You can do this 2 ways in coldfusion you can use the CFLOCATION Tag.  THis will redirect the page on the coldfusion side.  

<CFLOCATION URL="url" ADDTOKEN="Yes/No">

url --> url destination
addtoken --> if you want the client var to be appended to the url string


or you can do the redirection through javascript

<script language="javascript">
location.href = "urlpath";
</script>

Keep in mind that the JS if used will be executed after all the other coldfusion tags have been parsed and excuted

Hope this helps
0
 
beregothAuthor Commented:
Just what I was looking for...thanks for both solutions...I knew it was something simple.
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now