Hello,

I wrote a little FIrefox extension, and i have a some problem.

This is code is working:

function testAjax() {
  doc = gBrowser.selectedBrowser.contentDocument;
  $.ajax({
    type: "POST",
    dataType: "html",
    url: "http://testsite/";,
    success: function(data) {
      alert (data);
    }
  }, doc);
}


This code is wrong, nothing error, but does not work:

function testAjax() {
  doc = gBrowser.selectedBrowser.contentDocument;
  $.ajax({
    type: "POST",
    dataType: "html",
    url: "http://testsite/";,
    success: function(data) {
      $('#block-user-0', data).appendTo($('body', doc));
    }
  }, doc);
}

What's wrong?


Thanks, NeverGone :)

Reply via email to