Question: I'm trying to make the save button in the message part of the discussion board go back to the team site instead of staying on the discussion board page. I've been looking for a few hours but i havent been able to find much. i tried to insert this code:

```
<script type="text/javasccript">
$(document).ready(function() { 
  var button = $("input[id$=SaveItem]");
  // change redirection behavior
  button.removeAttr("onclick");
  button.click(function() {
  var elementName = $(this).attr("name");
  var aspForm = $("form[name=aspnetForm]");
  var oldPostbackUrl = aspForm.get(0).action;
  var currentSourceValue = GetUrlKeyValue("Source", true, oldPostbackUrl);
  var newPostbackUrl = oldPostbackUrl.replace(currentSourceValue, "mySite.aspx");
  if (!PreSaveItem()) return false;
  WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(elementName, "", true, "", newPostbackUrl, false, true));
  });
}); 
</script>

```

but it didn't work and i got this error in the NewForm.aspx:

Language Filter: Not Connected

The language filter is not connected. To connect the language filter open the Web Part edit menu and choose "Connections" to connect this language filter to other web parts.

Anyways now i'm lost, any help would be great.

Answer: 
You can change the Source parameter of the new item form querystring like this:

```
http://siteurl/testing/teamsite/Lists/Team%20Discussion/New1.aspx?Source=siteurl

```

When you click Cancel or Save button, the page will be redirected to the url specified. Then no jquery will be required for overriding Save button.

For more details, see this post <http://sympmarc.com/2009/10/20/passing-a-source-parameter-on-the-query-string-with-multiple-other-parameters/>
I've seen so many posts on how to do this – without the `SOURCE` querystring.

So I have tested this solution for hours in SharePoint 2013. This SAVE button absolutely redirects as expected; I have it redirecting to `"/Pages/default.aspx"`.

```js
$(document).ready(function() {

var elementName;
var oldPostbackUrl;
var currentSourceValue;
var newPostbackUrl;

var button = $("input[id$=SaveItem]");

// change redirection behavior
button.removeAttr("onclick");
button.click(function() {
  var elementName = $(this).attr("name");
  var aspForm = $("form[id=aspnetForm]");
  oldPostbackUrl = aspForm[0].action;
  currentSourceValue = GetUrlKeyValue("Source", true,    
  oldPostbackUrl);
  newPostbackUrl = oldPostbackUrl.replace(currentSourceValue, "/Pages/default.aspx");

  if (!PreSaveItem()) return false;

  WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(elementName, "", true, "", newPostbackUrl, false, true));

}); //end button.click

}); //end doc ready

```