View member feedback to this tip.
If you have multiple views that link to the same documents, it can be convenient to return a user to the view they used to open a document when the document is submitted or closed.
One way to do this is to set the view name in the cookie whenever you leave the view, then use the cookie to reopen the last view by invoking some JavaScript to go to the last view.
In the onunload event of the $$ViewTemplate form, add the following code:
Add the following functions to a script library or JSHeader:
In the $$Return field, a cancel button, or another action, calls the "bk()" function. For example, you could put the following in the $$Return field: <script>bk();</script>
MEMBER FEEDBACK TO
To continue reading for free, register below or login
To read more you must become a member of SearchDomino.com
');
// -->

THIS TIP
I prefer a different technique that doesn't require a cookie. When creating the link to open the document, add a URL parameter containing the name of the $$ViewTemplate alias. For example:
When creating the $$Return for the newly opened document use @UrlQueryString("form") to code the return link to open the calling form -- no cookie needed. For example:
Douglas F.
Do you have comments on this tip? Let us know.
This tip was submitted to the SearchDomino.com tip exchange by member Chad Cole. Please let others know how useful it is via the rating scale below. Do you have a useful Notes/Domino tip or code to share? Submit it to our monthly tip contest and you could win a prize and a spot in our Hall of Fame.