title: Iframe method of uploading file returning HTML tags in returned HTML
body: <p>I am using the iframe jquery method to upload a file to my server. My PHP file that processes the uploda returns a JSON string.
  The returned data is coming back with HTML in the data (which I imagine Firefox is putting in). How can I stop this or just strip out the JSON?</p>
  
  <pre><code>function uploadFile() {
        $("#invoice_upload_form").submit();                                                                                        
        $('#invoice_upload_frame').on('load',function(e) {
          e.preventDefault();                   
          if($(this).contents()[0].location.href.match($(this).parent('form').attr('action')))
          {
            var html_return = $(this).contents().find('html').html();
            //var json_return = JSON.parse(html_return);
            alert(html_return);
            //alert(json_return);                                        
          }
        });
      }
  </code></pre>
  
  <p>Comes back as:</p>
  
  <pre><code>&lt;head&gt;&lt;link rel="alternate stylesheet" type="text/css" href="resource://gre-resources/plaintext.css" title="Wrap Long Lines"&gt;&lt;/head&gt;&lt;body&gt;&lt;pre&gt;{"success":false,"message":"Error importing invoice file"}&lt;/pre&gt;&lt;/body&gt;
  </code></pre>