Question : redirect script needed for sharepoint survey site

Hi

I have created a sharepoint site to place my surveys. Once the user has completed the survey they get redirected to overview.aspx, on overview.aspx I would like to put a redirect script in so that when a user comes from newform.aspx he/she will be redirected to custom thank you page that I have created.

Can someone please hep.

Answer : redirect script needed for sharepoint survey site

In overview.aspx page you can add the javascript to redirect.
I hope you know where to add the script tag.
You can use document.referrer to know whether it is referred by newform.aspx or some other.
1:
2:
3:
4:
5:
6:
7:
<script>
function redirect()
{
  window.location.href = "thankyou.aspx";
}
_spBodyOnLoadFunctionNames.push("redirect");
 </script>
Random Solutions  
 
programming4us programming4us