Add Source parameter to SharePoint links

Normally while working with SharePoint you notice that while clicking on any link takes you to the default view or to the home page…how good it had been that you could redirect back to the previous page.

Let us first know how SharePoint does it. SharePoint adds a “Source” parameter to the querystring and uses that  to return back to the previous page.

So how do we do that??

There are lot of ways to do this, why not use us the ways sharepoint does it.. (the standard way as they say)

Sharepoint uses a javascript function “GoToLink” to achieve this i.e. add a “Source paarameter to the query string”

Call this function “onclick” of your hyperlink and it will automatically append previous page as source parameter

Example

edit  item

Related Post

2 thoughts on “Add Source parameter to SharePoint links

  1. It is a standard javascript function available in the core.js file of sharepoint.

    You can find core.js in the layouts folder
    e.g _layouts/1033/core.js

Leave a Reply

Your email address will not be published. Required fields are marked *