Note that there are some explanatory texts on larger screens.

plurals
  1. POChrome jQuery form plugin cross-domain security bug?
    primarykey
    data
    text
    <p>I'm trying to use <a href="http://www.malsup.com/jquery/form/" rel="nofollow">jQuery Form Plugi</a>n to handle file uploads in an ajax form.</p> <p>Everything works as long as I don't have an input[type=file] in the form. </p> <p>When I add a file input type to the form, it will upload the file and work as it is supposed to in FireFox, but I get this error in Chrome:</p> <blockquote> <p>Unsafe JavaScript attempt to access frame with URL <a href="http://swbdev.net:8888/inc/ajax/edit_page/" rel="nofollow">http://swbdev.net:8888/inc/ajax/edit_page/</a> from frame with URL <a href="http://swbdev.net:8888/site-pages-edit/19d8bb79c95e164f736f324d1b09a33e/1/#add_elements" rel="nofollow">http://swbdev.net:8888/site-pages-edit/19d8bb79c95e164f736f324d1b09a33e/1/#add_elements</a>. Domains, protocols and ports must match.</p> </blockquote> <p>It clearly states the Domain, protocols and ports must match. Am I missing something, in that same error it shows the two URLs and the domain, protocol and port all match?</p> <p>Here is the JavaScript calling the plugin:</p> <pre><code> &lt;script type="text/javascript"&gt; $(document).ready(function() { var options = { success: function(data) { alert(data); }, dataType: 'html', url: '/inc/ajax/edit_page/' }; $('#add_elements_form').ajaxForm(options); }); &lt;/script&gt; </code></pre> <p><strong>MORE INFO:</strong></p> <p>It's now failing in FireFox as well, not sure why it worked earlier, but here is the error in FireFox:</p> <blockquote> <p>Permission denied for <a href="http://swbdev.net:8888" rel="nofollow">http://swbdev.net:8888</a> to get property Location.href</p> </blockquote> <p>It points to this area of code in the plugin:</p> <pre><code> function cb() { if (xhr.aborted) { return; } var doc = io.contentWindow ? io.contentWindow.document : io.contentDocument ? io.contentDocument : io.document; if (!doc || doc.location.href == s.iframeSrc) { // response not received yet if (!timedOut) return; } io.detachEvent ? io.detachEvent('onload', cb) : io.removeEventListener('load', cb, false); var ok = true; </code></pre> <p>Specifically, this line:</p> <pre><code> if (!doc || doc.location.href == s.iframeSrc </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload