title: JavaScript Error: Uncaught SyntaxError: Unexpected token <
body: <p>I am trying to build a path and then create a script element using JavaScript. My code is below:</p>
  
  <pre><code>var Form = Parse.Object.extend("Form");
  var query = new Parse.Query(Form);
  query.equalTo("owner",Parse.User.current())
  query.find({
      success: function(form)  {                                
          var uid;                                
          for (var i = 0; i &lt; form.length; i++) 
          {                                                                        
              var uid = form[i].get("uid");
              var smartFormURL = "forms.ontraport.com/v2.4/include/formEditor/genbootstrap.php?method=script&amp;uid=" + uid + "&amp;version=1";
              var script = document.createElement('script');
                  script.type = 'text/javascript';
                  script.src = smartFormURL;                                        
              document.getElementById("smart-form-container").appendChild(script);
          }
      },
      error: function(error)  {
          console.log(error);
      }
  });
  </code></pre>
  
  <p>I am storing a UID in a parse class. I am retrieving the UID and then building an Ontraport SmartForm path. I then want to create a script tag and insert it into my smart form container (a div). But I a <code>Uncaught SyntaxError: Unexpected token &lt;</code></p>
  
  <p>Any thoughts?</p>