How do I get data into a div without refresh?
<p>I have some data that I want to show using JQuery but don't know how to show it. I have a search box where the user types a search term, then when it's submitted, if found, a div would be shown with the data. If the search term was not found, the div should not be shown.</p>

<p>I know how to do this when the page refreshes but how to do this without a page refresh. Can someone please point me to an example?</p>

<hr>

<p>EDIT:</p>

<p>This is what I am currently using. I'm really new to JQuery so some of the examples that have already been posted seem a bit different. I'm not really sure which example would work for me.</p>

<pre><code>$.ajax({
  type: "POST",
  url: "http://site.com/search.php",
  data: dataString,
  dataType: 'json',
  success: function(data) {
    if(data.success == 1){
      alert('success');
    }else{
      alert('fail');
    }
  }
});
return false;
</code></pre>
