Solved

Return to previous webpage

Posted on 2002-05-07
18
206 Views
Last Modified: 2013-12-18
A while back I had a problem where I was trying to return the user to the previous page they were in and Zvonko gave me a solution:

Click here if you want to see original question:
http://www.experts-exchange.com/jsp/qManageQuestion.jsp?qid=20150041


Anyway his solution was placing this code in my $$Return

"[/" + @SubSet(@DbName;-1)+"/"+@SubSet(@ViewTitle;-1)+"]"


This worked great accept now I have a user who has expanded several categories in a view to find a specific document, and when they open the document and then save the document the $$Return brings them back to the original view successfully however the view categories are not returned to the same state that they were in... ie: some categories should be left expanded, and some should be left collapsed etc.  Instead it is auto-expanding EVERYTHING.

Any ideas to return the view to exactly how the user left them?
0
Comment
Question by:snocross
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
  • 2
  • +3
18 Comments
 
LVL 9

Expert Comment

by:Arunkumar
ID: 6994816
Hi Sno !

:-)
0
 
LVL 5

Author Comment

by:snocross
ID: 6994832
Howdy friend!  That was fast!
0
 
LVL 10

Expert Comment

by:zvonko
ID: 6994849
Hi Sno!

Hello Arun, I have posted a proposal to your dsk problem :)

Sorry Sno that I got a bit quiet at last time, but I am overworked :)

For your view state problem is a CGI variable HTTP_REFFERER to be used. But to get exact scenario I have to test a bit.

Is this view to be reopend displayed in applet or html mode?


0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 5

Author Comment

by:snocross
ID: 6994853
Hi Zvonko,

HTML mode.
0
 
LVL 10

Expert Comment

by:zvonko
ID: 6994862
OK, I test my idea and come back again...

So long,
zvonko

0
 
LVL 5

Author Comment

by:snocross
ID: 6994869
Sounds good!
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 6994944
Sno, The solution was already available in the thread . Check out for my comment in the link.

~Hemanth
0
 
LVL 10

Expert Comment

by:zvonko
ID: 6994952
I got it Sno!

Here it goes.
Create two fields on your document form.
One field name has to be: HTTP_REFERER
For the next (to the right side) field is the name not important, but I sugest this name: LastView
The formula for LastView has to be this:
FIELD HTTP_REFRER:=HTTP_REFERER;
FIELD LastView:=LastView;
@If(@Contains(HTTP_REFRER;"?OpenView");@SetField("LastView";HTTP_REFERER);"")

So you can use the value of the field LastView in your $$Return field like this:
FIELD LastView:=LastView;
"["+LastView+"]"

Important note is to set Form property: GenerateHtmlForAllFields

Tell me how it works in your environment.

So long,
zvonko

PS. there a surely some situation not corectly handled, but test this first version. The improved version will follow :-)

0
 
LVL 10

Expert Comment

by:zvonko
ID: 6994958
Hi Heman,

the Http_Referer alone is not the solution because every document refresh or recalculation set the Http_Referer to the previous document link and loose the view link.

In my proposal is the $$Return check not handled when LastView was empty. This I have to test and provide.

0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 6994986
Gotcha.
0
 
LVL 9

Expert Comment

by:Arunkumar
ID: 6994994
Hey Bro & Buddy !!!

Howdy ?

Bro, I have grooved lots of messages and posts for you.
And whom are you playing chess with ?  Is the next move mine ?

;-)
0
 
LVL 10

Accepted Solution

by:
zvonko earned 50 total points
ID: 6994995
Try this formula improvement for $$Return:
FIELD LastView:=LastView;
@If(LastView!="";"["+LastView+"]";
"[/"+@Subset(@DbName;-1)+"/"+@Subset(@ViewTitle;-1)+"]")

0
 
LVL 13

Expert Comment

by:CRAK
ID: 6995010
Have you tried my suggestion in the previous discussion?
Simply store the entire views URL in every (viewtemplates?) onLoad-event and allow javascript on documents to retrieve that value and reload it.
It automatically resists document refreshes, reloads, section expansions etc. without a whole lot of effort!
If you're not yet using a frameset: try a simple single frame frameset....
0
 
LVL 10

Expert Comment

by:zvonko
ID: 6995024
Hi CRAK,

your JavaScript proposal is a browser client side solution. I would prefer it for page display mode.
But when you post a form to be submited to Domino, then you can not redirect to the View because you have to save document first.

Framset or no frameset does not make difference in this client side redirection concept.

0
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 6995661
Listening...
0
 
LVL 13

Expert Comment

by:CRAK
ID: 7002190
In cases like this, the use of HTTP_Referer isn't always very suitable: expanding/collapsing sections, refreshing on keyword changes etc. makes you lose track. Can't say that I never use it though!

My approach overcomes that, though it has a different disadvantage: if a category is changed (i.e. new one is added, appearing higher in the view than the expanded category), you'll still get the wrong category opened. In cases where categories can not be user defined, that should be no problem.

Zvonko, I don't understand your remark: yes, it's a browser client side solution, but what's wrong with that? I use document.forms[0].save to, to avoid the problem you describe. No need for $$Return!

I've posted a little demo on my site (will remove it in time): http://home.wanadoo.nl/ralph.kersten/temp/ret2vw.zip (sorry, haven't got a www-domino server). It starts (as indicated) in the frameset.

Suggestions are welcome!

By the way Sno, how did the user expand "several categories" in an HTML-view?
0
 
LVL 5

Author Comment

by:snocross
ID: 7002212
There was several groupings and they would click one group at a time until they found their document.  Then when they went back they would have to click the multiple levels of groupings again.
0
 
LVL 5

Author Comment

by:snocross
ID: 7060138
This did exactly what I needed.  Thanks everyone!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How do you create a simple buy now button for a website? 7 79
@Mailsend 3 98
Code for extraction to mkdir folder 5 92
ESXCLI upgrade command 1 160
Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Click on Too…
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question