title: Chrome extension transfer to manifest 2 - No ajax response
body: <p>Hayush!
  Been trying to transfer my Chrome extension to manifest 2. Everything is working except for one script which calls an ajax. I have a variable that contains a JSON content which needs to be transferred to the server.</p>
  
  <pre><code>function sendlist(list){
  
  jsontext = JSON.stringify(list);
  
  $.ajax({
          url: amfurl + "user/listbookmarks/",
              dataType: 'text json',
          async: true,
          type: 'POST',
          processData: false,
              data: {'folders': jsontext}, 
  
          success: function(data){
              $('#importing').css('display','none');
              $('#importdone').css('display','block');
              console.log(data);      
          },
          error: function(xhr, status, error) {
              var err = eval("(" + xhr.responseText + ")");
          alert(err.Message);
  }
  });  
  }
  </code></pre>
  
  <p>For some reason the ajax part is not executed at all. No error message was triggered, nor in the server error log.</p>
  
  <p>All of the inline scripts and scripts in general were included in the popup.js. So it's probably not the issue. </p>
  
  <p>Any thoughts?</p>
  
  <p>Thanks!</p>
  
  <p>The following code works perfectly on previous manifest</p>
  
  <pre><code>function importbookmarks(){
  $('#formadd').css('display','none');
  $('#importing').css('display','block');
  _gaq.push(['_trackEvent', 'chromextension','importbookmarks', username]);
   chrome.bookmarks.getTree(function(bookmarks) {
          sendlist(bookmarks);
     });
  }
  
  
  function sendlist(list){
  jsontext = JSON.stringify(list);
  $.ajax({
          url: amfurl + "user/listbookmarks/",
              dataType: 'text json',
          async: true,
          type: 'POST',
      //  processData: false,
              data: {'folders': jsontext}, 
  
          success: function(data){
              $('#importing').css('display','none');
              $('#importdone').css('display','block');
              console.log(data);
  
          }
  });  
  }
  </code></pre>