问题
I keep getting this error everytime I make an AJAX (iFrame) request to upload a video to viddler.
Permission denied to get property XMLDocument.readyState
ajaxupload35.js (line 455)
[Break on this error] if (doc.readyState && doc.readyState != 'complete'){
Line 455 to 460 is this:
// fixing Opera 9.26
if (doc.readyState && doc.readyState != 'complete'){
// Opera fires load event multiple times
// Even when the DOM is not ready yet
// this fix should not affect other browsers
return;
}
Full script can be found here.
I keep getting this error although everything works for me. But I would rather solve it - can anyone help?
From another stackoverflow question, I read from Tor Haugen "Does you iframe reference another domain? If it does, you're probably hitting your browser's cross-site scripting defence".
Is the same case for me, if so, how can I fix this?
Thanks
回答1:
You need a server-side proxy to make the cross-domain request for you, and call this proxy with your AJAX, because Javascript cannot access other domains.
来源:https://stackoverflow.com/questions/1084971/permission-denied-to-get-property-xmldocument-readystate