views:

293

answers:

1

Hello all,

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

+2  A: 

You need a server-side proxy to make the cross-domain request for you, and call this proxy with your AJAX, because Javscript cannot access other domains.

Josh Stodola
Its a form that is being submitted to viddler from my site using an iFrame and just waiting for the response. Surely, JS can do thi without access the other domain, right?
Abs
Yes, you can submit it, but you can't get the response because it resides in a frame which is displaying an HTML page (or any other type of response) from another domain.
Josh Stodola