getJSON not fetching data
===

I have a JavaScript file which looks something like this:

    $(document).ready(function(){
      $('#getdata-button').live('click', function(){
        $.getJSON('json-data.php', function(data) {
          alert(data); //uncomment this for debug
          $('#showdata').html("<p>item1="+data.item1+" item2="+data.item2+" item3="+data.item3+"</p>");
        });
      });
    });

The PHP file json-data.php contains: 

    <?php
    $arr = array('a' => 1, 'b' => 2, 'c' => 3, 'd' => 4, 'e' => 5);
    
    echo json_encode($arr);
    ?>

When I try to run my Javascript, I see that the getJSON line fetches the php line in the Chrome debug console. But no data is being displayed on the screen. As in, the entire code in getJSON block is not being invoked.


