Return The User To Their Original Location After Being Directed By A Link To Another Location.

Return The User To Their Original Location After Being Directed By A Link To Another Location.

Most Web applications will temporarily direct the user to another page.
Examples include:

1. Having the user register with the site
2. Having the user submit feedback.

But when the user wishes to return to their original location, they usually
have to click the 'Back' button several times and hope they end up where they
want to be!
Wouldn't it be great if you could grant them that 'return' capability with a
simple bit of code?

There is a simple JavaScript solution however it is not supported in IE3:
[history.go(-the Number of screens you want the browser to back up)]

Here's a cool and easy way to make it work regardless of the browser:
Assume that our Domino site has a hot spot called "Feedback" that is available
from any location in the site. When clicking on the "Feedback" link the user
will compose the Feedback form. You, the developer must include a computed
field called HTTP_REFERER, which has the default formula:

HTTP_REFERER

Notes will automatically put the HTTP_REFERER CGI variable value into
this field when the user composes the Feedback.

The $$Return field will look something like this:
__________________________________________________________________
Ref := HTTP_REFERER ;
Thanks := "<p><h2>Feedback Submitted:</h2></p>" + "
<h4>Thank you for taking
the time to complete this form." + "</h4>
";

    Requires Free Membership to View

    Register today to access targeted resources from our editorial writers and independent industry experts focused on Lotus Domino, Notes, Workplace and other related technologies.

    By submitting your registration information to SearchDomino.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchDomino.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.


GoBack := "<A HREF="+Ref+">Click here to go back to your original location</A>";
Thanks + GoBack
___________________________________________________________________

That's all !

Zoe Nadler Certified Lotus Professional - Principal in Web Development
ZNet, Inc.
zoezev@aol.com

This was first published in November 2000

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.