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

FLOATING RETURN FUNCTION

Status
Not open for further replies.

kingjjx

Programmer
Sep 18, 2001
181
US
Hi I need a function so that when a visitor to our site clicks on one of five buttons that go to another site on our own server a floating RETURN to the original page will follow them on their links throughout the secondary site.
We will need to be able to specify what the Floateing Return Button says, such as, "Return to PP Ohio" or something to that effect.

Can you tell me how to build this function in Cold Fusion
(or if there is a more efficient way to do it)

Thank you very much
-jon

 
If the five buttons are links, then there is a CGI variable named CGI.HTTP_REFERER that contains the URL of the page from which you linked. If you need to trace this as the visitor travels throughout your site, then save it as a Session variable.

However, this won't work if your pages are in different CF_APPLICATIONs, because each application has its own variable space. In that case, you may need to store the link in a database table that all your pages know about. We used a table like that to communicate between applications. The mechanism was a table ID number that we passed as a URL variable.

Mike
 
sometimes the most obvious solution is somehow missed. you have a link on your site that user will click. ok, create links that will point to the template with all the parameters (like return links or whatever other links you want to have ):

<a href=&quot; target=&quot;_new&quot;>link1</a>


finally, the paramTemplate.cfm template will point to this template:


<!--- Window with floating link --->
<html>
<head><title>Floating Link</title></head>
<frameset rows=&quot;25,*&quot; frameborder=0 border=0>
<frame name=&quot;top&quot; src=&quot; marginwidth=&quot;10&quot; marginheight=&quot;10&quot; scrolling=&quot;no&quot; frameborder=&quot;no&quot;>
<frame name=&quot;bottom&quot; src=&quot; marginwidth=&quot;10&quot; marginheight=&quot;10&quot; scrolling=&quot;auto&quot; frameborder=&quot;no&quot;>
</frameset>
</html>


two frames, source of the first is template that have the return link, and the second is acctual link destination.

:)
Sylvano
dsylvano@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top