jquery post docs.google.com/forms/ CORS code example

Example 1: jquery post docs.google.com/forms/ CORS

<script type="text/javascript">
   // set the target on the form to point to a hidden iframe
   // some browsers need the target set via JavaScript, no idea why...
   document.getElementById('my-form').target = 'my-response-iframe';
   // detect when the iframe reloads
   var iframe = document.getElementById('my-response-iframe');
   if (iframe) {
     iframe.onload = function () {
       // now you can do stuff, such as displaying a message or redirecting to a new page.
     }
   }
</script>

Example 2: jquery post docs.google.com/forms/ CORS

<iframe id="my-response-iframe" name="my-response-iframe"></iframe>

Example 3: jquery post docs.google.com/forms/ CORS

<form id="my-form" target="my-response-iframe" action="https://docs.google.com/forms/u/1/d/e/<YOUR-ID>/formResponse" method="post">
  <input type="text" name="entry.12345678" value="" required>
  <input type="submit">
</form>