title: Google Forms redirection after submission
body: <p>I'm looking for a solution that when the form is submitted, under the submitted button appears a thank you message appears as oppose to it being redirected to the same web page as i currently have it now.</p>
  
  <p>I'm a novice so please provide an example, thanks.</p>
  
  <p>The relevant bit of script is: </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;var submitted=false;&lt;/script&gt;
  &lt;iframe name="hidden_iframe" id="hidden_iframe" style="display:none;"     
  onload="if(submitted)          
  {window.location='http://originalblueskythinking.blogspot.co.uk/2013/01/what-drives-us-    
  fantasies-or-dreams_22.html';}"&gt;&lt;/iframe&gt;
    &lt;form action="https://docs.google.com/spreadsheet/formResponse?     
  formkey=dFh5VndEdW9JQzVrUU9FdjYteDNfSHc6MQ&amp;amp;ifq" id="ss-form" method="POST"     
   target="hidden_iframe" 
   onsubmit="submitted=true;"&gt;
  
  &lt;br /&gt;
  &lt;div class="errorbox-good"&gt;
  &lt;div class="ss-item ss-item-required ss-radio"&gt;
  &lt;div class="ss-form-entry"&gt;
  &lt;label class="ss-q-title" for="entry_0"&gt;&lt;b style="font-family: Leelawadee; text-align:    
  justify;"&gt;&lt;span style="color: orange; font-size: large;"&gt;What would you say you are  
  more of, a dreamer or fantasist?&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/label&gt;&lt;br /&gt;
  
  &lt;label class="ss-q-title" for="entry_0"&gt;&lt;b style="font-family: Leelawadee; text-align:  
  justify;"&gt;&lt;span style="color: orange; font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/label&gt;
  &lt;span style="color: white;"&gt;&lt;label class="ss-choice-label"&gt;&lt;input class="ss-q-radio"   
  id="group_0_1" name="entry.0.group" type="radio" value="I'm a dreamer and have a 
  ideologist natural" /&gt;
  
  &lt;/label&gt;&lt;span style="font-family: Leelawadee; text-align: justify;"&gt;I'm a dreamer and 
  have a ideologist natural&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
  
   &lt;span style="color: white; font-size: small;"&gt;&lt;input class="ss-q-radio" id="group_0_2"   
   name="entry.0.group" type="radio" value="I'm a fantasist and I find my self escaping " 
   /&gt;&amp;nbsp;&lt;span style="font-family: Leelawadee; text-align: justify;"&gt;I'm a fantasist 
   and I find my self escaping&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
  &lt;br /&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;br /&gt;
  &lt;input name="pageNumber" type="hidden" value="0" /&gt;
  &lt;input name="backupCache" type="hidden" value="" /&gt;
  
  
   &lt;br /&gt;
   &lt;div class="ss-item ss-navigate"&gt;
   &lt;div class="ss-form-entry"&gt;
   &lt;input name="submit" type="submit" value="Submit" /&gt;&lt;/div&gt;
   &lt;/div&gt;
   &lt;/form&gt;
    &lt;script type="text/javascript"&gt;
  
    (function() {
    var divs = document.getElementById('ss-form').
    getElementsByTagName('div');
    var numDivs = divs.length;
    for (var j = 0; j &lt; numDivs; j++) {
    if (divs[j].className == 'errorbox-bad') {
    divs[j].lastChild.firstChild.lastChild.focus();
   return;
    }
    }
    for (var i = 0; i &lt; numDivs; i++) {
    var div = divs[i];
    if (div.className == 'ss-form-entry' &amp;&amp;
     div.firstChild &amp;&amp;
    div.firstChild.className == 'ss-q-title') {
    div.lastChild.focus();
    return;
    }
    }
    })();
    &lt;/script&gt;&lt;/div&gt;
  </code></pre>