title: Can't get info from JSON using a html form element and getJSON method using wikimedia
body: <p>I'm trying to submit something to search with the form and pull info from the j son </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$("#target1").submit(function(e) {
    e.preventDefault();
    var x = document.getElementById("input").value;
    var url = "https://en.wikipedia.org/w/api.phpaction=query&amp;format=json&amp;prop=revisions&amp;list=search&amp;titles=&amp;rvprop=content&amp;srsearch=" + x;
    var the = function(teh) {
      $("#target2").text(teh.continue.continue);
    }
    $.getJSON(url, the);
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;form action="" method="" id="target1"&gt;
    &lt;input class='text-center' type='text' id='input' placeholder='Search 
      Wikipedia' required&gt;
  &lt;/form&gt;
  &lt;div class='text-center'&gt;
    &lt;p id='target2'&gt;&lt;/p&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>example link of json:
  <a href="https://en.wikipedia.org/w/api.php?action=query&amp;format=jsonfm&amp;prop=revisions&amp;list=search&amp;titles=&amp;rvprop=content&amp;srsearch=cats" rel="nofollow noreferrer">https://en.wikipedia.org/w/api.php?action=query&amp;format=jsonfm&amp;prop=revisions&amp;list=search&amp;titles=&amp;rvprop=content&amp;srsearch=cats</a></p>
  
  <p>I am trying to get the info from the titles but im just using the "continue" to make it shorter.<br>
  full code at <a href="http://codepen.io/nunez7890/pen/aWWXqy" rel="nofollow noreferrer">http://codepen.io/nunez7890/pen/aWWXqy</a></p>