title: jQuery to check if returned data object is empty
body: <pre><code>$("#post").live("click",function()
  {
      $("input:checkbox[name='bookmarkid']:checked").each(function()
      {
           $.post("php/socialbookmark-post.php", {bookmarkID: $(this).val()},function(data)
           {
                if(data != "") alert(data);
           });
      });
  });
  </code></pre>
  
  <p>the php file outputs some text only if something goes wrong. The checking that I do fails if the data is empty and displays an empty message. I need to fix this. Any ideas?</p>