title: jquery parsejson not working
body: <p>In a different post named "confused how to use jquery getJSON properly" I was having difficulty on how to make my ajax call work and peoples' comments helped me out. But my jquery ajax call still isn't working:</p>
  
  <pre><code>$(document).ready(function(){   
      $("input#autofill").click(function()
      {
          $.get("last_year_ISBN.php",
                    function(data){
                    alert(data);
                    var isbns = $.parseJSON(data);    //creates a javascript object.
                    var elements = $('#booklist .ISBN_number');
                    $.each(isbns, function(index, obj){
                      alert("hello");
                      $(elements[index]).val(obj);
                      });
                    },
                    "json");
  
  
  
      });
  });
  </code></pre>
  
  <p>The first alert(data) properly prints out the json, so I know the ajax call works. but when I did a debug with firebug, I found out that the variable isbns is set to null. Also, when I put an additional alert("hello") inside the callback function it wasn't called and didn't appear on the screen. Can someone help me figure this out?</p>