Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

At our organization, we've buried our SP installation in the bowels of our corporate intranet front-end, so it's always completely non-intutive to find. I've created a "How to get to SharePoint" tutorial as part of a documentation wiki, but here's what I'm running into:

There are dozens of pathways to get to "How to Get to Sharepoint", but no automated way to go BACK from whence I came. Ideally, we'd like a link to the referring page as the "next step" in the process, after someone reads how to get to SharePoint.

Is there something like this that's out there?

We're running SP2010 Foundation, and our area does not have access to Designer or development resources. :|

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

If you can drop a Content Editor web part into the page you can add an anchor and some javascript into the web part that looks like this:

<a href="javascript:history.length&gt;0?history.back(): window.location = &#39;http://yoursitehere.com&#39;;">Go back to previous page.</a>

Just replace "yoursitehere.com" with your own site page URL and it ought to work.

To break that out, it looks like this:

if(history.length > 0)
{
    history.back()
} else window.location = "http://mainpageofthesite.com"

I believe SharePoint actually converted the greater than and quote symbols for me, but I could be mistaken.

share|improve this answer
    
Nice and simple. It should be marked accepted. –  BGM Jul 17 '13 at 15:22
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.