title: How to get input value into ajax request
body: <p>I'm don't know how to get the value from the textbox into my search query, for the API I'm using.
  In this example I want to get information about London, but how can I replace <code>London</code> with the value from the <code>city</code> text-input.</p>
  
  <pre><code>$.getJSON('https://api.search?near=LONDON&amp;v=20120101',
  &lt;body onLoad="init()"&gt;
  Search the place: &lt;input type="text" id="city" class="cjtxt"&gt;&lt;/input&gt;
  </code></pre>
  
  <p>I tried to do the following:</p>
  
  <pre><code>$.getJSON('https://api.search?near=+city&amp;v=20120101', function(){});
  </code></pre>
  
  <p>But with no success.. What am I doing wrong, and how can I solve this?</p>
  
  <p>Any idea?</p>