Code to Link User Back to SharePoint List View

Hello,

I have been fighting for a bit with a pesky problem. I have a SharePoint list item display page from which a user can follow several links from and move forward by clicking links. Users will get two or three pages removed in the history from this portal page.

The link is: http://www.site.com/Lists/Parent/Item/displayifs.aspx?List=e0d68...&ID=3

This is a dynamic page; a page on which I have added other web parts. So, that link will be dynamic - different for each item. A static hyperlink won't work. Users may travel through several different links, so using simply JavaScript to link to document.referrer, etc., won't do the trick. The number of steps removed they are is variable, so I can't rely on a history.go() statement either.

There has to be an elegant way to solve it. Ideal pseudocode would look something like: Set Hyperlink to most recent history page which contains display.ifs.

Thanks,
Joseph Irvine
jkeagle13Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

GaryCommented:
Link not working and I'm not exactly following your question.
0
jkeagle13Author Commented:
The link was meant to be an example and was truncated; this site is on an intranet and isn't accessible to the public.

Basically I have a dynamic URL that is a display form for an item, in the case of the link, item number 3. A user will be on that page, and will navigate off to several different pages. I want something akin to a "back" button - a hyperlink that takes the user back to that display view for the specific item, hopping back over the two or three pages the user may have visited in the interim.

My original code was just a hyperlink to document.referrer as I could put in constraints that would ensure nobody was ever more than one page removed from the list display view. A rule changed that now allows users to visit more than one page.

Thanks!
0
GaryCommented:
Ok makes a bit more sense.
Why not just use a Page.Session to hold the url?
0
Rainer JeschorCommented:
Hi,
question: is your display form being opened as dialog?
If not, why not open the other different navigation links as dialog windows hence closing them will bring the user "back" to his starting point?

BTW. which SharePoint version and edition?

HTH
Rainer
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jkeagle13Author Commented:
Hello,

Brilliant solution, Rainer. Thanks. Amazing in its simplicity. I had disabled dialog windows so that it rendered everything as a page some time ago very early in the development process since it would give me more flexibility at the time.

The dialog window did the trick! Brilliant in its simplicity; amazing how one can miss such obvious things when staring at a problem week in and week out - losing the forest through the trees.

Thanks,
Joseph Irvine
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
jQuery

From novice to tech pro — start learning today.