title: firefox ajax call returning NS_ERROR_DOM_BAD_URI or jsonp false error
body: <p>In relation to <a href="https://stackoverflow.com/questions/7949099/cant-debug-hanging-post-in-firefox-extension/7954947">can&#39;t debug hanging $.post in firefox extension</a></p>
  
  <p>can anyone tell me why my extension <a href="https://builder.addons.mozilla.org/addon/1022928/latest/" rel="nofollow noreferrer">https://builder.addons.mozilla.org/addon/1022928/latest/</a> is with this ajax call:</p>
  
  <pre><code>var url = 'http://e-ønsker.dk/wishlist/ajax/add/';
  $(this).hide();
  //show icon loading
  $("#icon").show();
  $.ajax({
    type: "POST",
    url: url,
    data: {title:$("#txtTitle").val(), url:encodeURIComponent(taburl)},
    success: function(data, textStatus) {
          if(data.code &gt; 0)
      {
      $("#icon").removeClass().addClass('accept');
      }
      else
      {
      $("#icon").removeClass().addClass('error');
      if(data.code == '-1')
          alert('kunne ikke finde din ønskeseddel på e-ønsker.dk - besøg e-ønsker.dk, og prøv derefter igen');
      }
    },
    error: function(data, textStatus) {
        alert(textStatus);
      $("#icon").removeClass().addClass('error');
    }
  });
  </code></pre>
  
  <p>is returning the error NS_ERROR_DOM_BAD_URI. HttpFox says it's a 500 error which would indicate an internal error, but this exact call works from both chrome and safari in their extensions, so I'm suspecting the error to be related to firefox specifically.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>So I added <code>dataType: "jsonp"</code> and that did some of the magic, now I get a 200 response, but I still get a parsererror.</p>
  
  <p>Weirdest thing is that after I modify my server to accomodate JSONP jquery chooses the error method, and the xhr.statusText that I show here <code>alert(xhr.statusText);</code> gives me an alert with the statustext "success" why won't jquery choose the success method when it actually works??</p>