title: jquery ajax: Unexpected Token & function not defined
body: <p>This is my first attempt at javascript trying to call to API and I'm getting the following in the Chrome console:</p>
  
  <blockquote>
    <p>Uncaught syntax error: Unexpected Token ,</p>
  </blockquote>
  
  
  
  <blockquote>
    <p>Uncaught Reference Error: AjaxCall is not defined.</p>
  </blockquote>
  
  <p><a href="https://stackoverflow.com/questions/36297094/html-button-not-calling-function?noredirect=1#comment60219110_36297094">I just posted here today</a>, edited the answer to my liking, and got more errors.</p>
  
  <p>Thanks for helping!</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;button onclick="AjaxCall()"&gt;Click Here&lt;/button&gt;
          &lt;p id="Data"&gt;&lt;/p&gt;
  
          &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"&gt;&lt;/script&gt;
          &lt;script&gt;
              var vToken = "MyToken";
              var Target_URL = "MyUrl";
  
              function AjaxCall() {
                  $.ajax({
                      url: Target_URL,
                      headers: {
                          'Accept': 'application/json',
                          'Authorization',
                          'Bearer ' + vToken
                      },
                      method: 'GET'
                      success: alert(result)
                  });
              }
          &lt;/script&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>