submission stuck on please wait

AshrafJebril
Level 1
i have this code i am trying to test locally  but nothing happens , the button says please wait and i cant see any errors in the console 
 
<html>
  <head></head>
  <body>
    <form id="mktoForm_1001"></form>
    <div id="result"></div>
  </body>
  <script src="//app-sn04.marketo.com/js/forms2/js/forms2.min.js"></script>
  <script src="//go.cliftons.com/js/forms2/js/forms2.min.js"></script>
  <script>
    MktoForms2.loadForm(
      "//go.cliftons.com",
      "**********",
      1001,
      function (form) {
        // Add an onSuccess callback function to the form
        form.onSuccess(function (values, followUpUrl) {
          // Hide the form
          form.getFormElem().hide();

          // Show a success message
          document.getElementById("result").innerHTML =
            "Thank you for your submission!";
          return false;
        });
      }
    );
  </script>
</html>
1 REPLY 1
SanfordWhiteman
Level 10 - Community Moderator
  1. Why are you loading two copies of the forms library forms2.min.js? That's only going to lead to confusion, especially because the one loading from app-sn04.marketo.com will be blocked by tracking protection.
  2. You can't have <script> tags outside the HTML <body> tag.

Please fix those 2 fundamental errors and then link to a page that we can see. You should be using the standard embed code from Marketo. This non-standard setup (with invalid HTML) is a poor place to start!