?
Solved

$$Return on the web

Posted on 2001-07-12
8
Medium Priority
?
180 Views
Last Modified: 2013-12-18
I'm trying to fix someones database.  They use a $$Return field in a form to return to a previous view where they came from:

go1 := "<script>history.go(-2);</script>";
go2 := "<script>history.go(-3);</script>";
@If(@IsNewDoc;go1;go2)

They do this so they don't have to hardcode a view name in the $$Return field because they could have came from a number of different views.  This actually works, however when they are returned to the original view it does not REFRESH/RELOAD the view.  Is there a way to make the view refresh?

-Snocross
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
8 Comments
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 6278768
Bset method is to use http_referer in the document and your $$Return field would be

"[" + http_referer + "]"

~Hemanth
0
 
LVL 13

Expert Comment

by:CRAK
ID: 6279729
I use a frameset myself.
In the onLoad event of a view's $$Viewtemplate (if you use embedded views, you may just as well put in on the form's or page's onLoad-event) a set a variable in the "top"-level (frameset). As the frameset is never reloaded, the variable is safe there.
I use the variable to count the number of steps to go back in history (view sets variable to 0, forms/pages increase it by 1), or to store the view's actiual URL in.

The variable is read again when a user goes "back" to a view. The counter would actually go back in the history; NOT reload the view. It only avoids the if-construction.
Storing the view's URL, however, would solve your problem: instead of going back, you load that URL again:
location.href=<variable>

I prefer this method over http_referer as -in a number of applications- a "create new document"-button, first brings up a pop-up to allow a user to select a form-type. Http_referer would then refer to that pop-up. In normal situations Hemanth's solution should work just as well!
0
 
LVL 10

Expert Comment

by:zvonko
ID: 6282730
Hello Sno,

how about this:
"[<script>history.go(-"+@If(@IsNewDoc;"2";"3")+");location.reload();</script>]"

Regards,
zvonko
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 5

Author Comment

by:snocross
ID: 6285730
Ok, I will test your ideas... thanks.
0
 
LVL 5

Author Comment

by:snocross
ID: 6340776
Zvonko, I tried your solution but it keeps repeatedly RELOADING the page and I can't get it to stop with pressing CTL+ALT+DEL!
0
 
LVL 10

Accepted Solution

by:
zvonko earned 200 total points
ID: 6342501
shock!!!  :-)

...but to save my wizzard state I propose this:
"[/" + @SubSet(@DbName;-1)+"/"+@SubSet(@ViewTitle;-1)+"]"

<|;-)

(of corese this is working only if you select one document from a view and then after doing some steps press  on a button containing something like:
@Command([FileSave]);
@Command([FileCloseWindow])

If you do not come into the document from a view but perhaps from ?OpenForm, than above $$Return formula opens simply the database...

Is this OK for you?

Greetings,
zvonko

0
 
LVL 5

Author Comment

by:snocross
ID: 6380253
That worked beatifully, thank-you.  Thanks to everyone else for their suggestions too.
0
 
LVL 10

Expert Comment

by:zvonko
ID: 6394627
thanks for the points and for the feedback Sno <|;-)
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying 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

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

770 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