title: Saving survey response while redirecting user after clicking finish button in sharepoint
body: <p>I have a question related to sharepoint 2013. I have a survey. At the last page, there is a yes/no question. All I want is that after clicking the "Finish" button provided by Sharepoint, the user should be redirected to a thankyou page. I am providing this via this code:</p>
  
  <pre><code>$(document).ready(function(){
      if(document.getElementById('ctl00_ctl31_g_78e43776_7d3b_4ab6_9d50_7801d0032f15_c
          window.location = "/SitePages/ThankYouE.aspx";
      }
  });
  </code></pre>
  
  <p>However, the problem is the survey response is not saved because of redirection. When I remove redirection, saving process works well. </p>
  
  <p>My question: How can I manage both saving the survey and redirecting the user after saving this?</p>
  
  <p>I appreciate any helps.</p>
  
  <p>Thanks</p>