title: Passing a string in a jQuery Ajax function not working, but no problems for an integer
body: <p>I have a quick and likely easy question. I am new to jQuery and I have researched the stackoverflow files on this for answer that works without success. The function below takes an argument 'search_term', does some stuff on a success page and then reloads a file, on which $_POST['id'] is meant to return the value of search_term. This works perfectly if the search_term is an integer......but on my site it will always be a string. If I set $search_term = "hi", the error in the console is: </p>
  
  <p><em>ReferenceError: hi is not defined</em></p>
  
  <p>I have tried quotes around both the data parameters. Clearly it is an issue with my syntax if this is a string (I am assuming). Any suggestions would be helpful. I tried the jQuery documentation but there didn't seem to be an example that was exactly like mine, so no luck. Keep in mind I am pretty green. </p>
  
  <pre><code>function most_recent_search(search_term){
      $.ajax({
      url: '../ajax/success_page.php',
      type: 'post',
      data: {
            'search_term':search_term,
            },
      success: function(html) {
                     $('.thread_holder').load('search_thread_holder.php', {id: search_term});
                }
      });
      return false;
  }
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;ul&gt;        
      &lt;li&gt;
          &lt;a href="#tabs-2" onclick="most_recent_search(&lt;?php echo $search_term;?&gt;)"&gt;Most recent&lt;/a&gt;
      &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>