issue when using another iframe(s)

88 views
Skip to first unread message

rico

unread,
Oct 5, 2009, 4:46:32 PM10/5/09
to meteorserver, andrew...@gmail.com
Hello,

I'm have issue when implementing another javascript libs that use
their own iframe.

These libs are two jquery plugins : "ajaxUpload" and the jquery
version of "tinyMCE"

When using both meteor and ajaxUpload, the plugin can't get the
properties or the content of it's iframe :
Permission denied to get property HTMLDocument.readyState or
Permission denied to get property HTMLDocument.body.

I mean I can uploaded a file successfully but response from the server
will never be 'grab' by the lib because of this error.

The same issue occurs while using tinyMCE. if i create a new link from
the editor, then tinyMCE create and open an iframe and i get this
error : Permission denied to get property HTMLDocument.window.tinyMCE.

If i remove meteor, this plugins works well, while *Meteor works well
in all case* :)

It may be due to a crosscripting restriction, i don't know what to
do, as as said Meteor works well. All my js script are on the same
domain ( the libs are at http://mydomin.net and Meteor.js are at
http://data.meteor.js).

Hope i was clear enough -_-'.

thanks by advance for any response or advice :)

riccco





Michael Carter

unread,
Oct 5, 2009, 4:49:57 PM10/5/09
to meteor...@googlegroups.com
I suspect that you'll need to find a way to add one more line to the source of these plugins within the iframe:

document.domain=document.domain

or something similar. Just a wild guess. (I know it seems weird, but try it... should only take you a few seconds)

-Michael Carter

rico

unread,
Oct 12, 2009, 11:33:10 AM10/12/09
to meteorserver
Hello,

@Michael Carter : thanks for response.

You were right, the problem came from the definition of
document.domain before the creation of the meteor iframe in the
meteor.js file.

i found an intersting comment about this :
http://jszen.blogspot.com/2005/03/cross-domain-security-woes.html.

I just add comments at the setting of the document.domain in the
meteor.js and all is o now.

I know the best way would be to fix the document.domain in all the
iframes and the main window too, but it's more painfull to set the
document.domain each time the plugin i used will be updated.

thanks.

riccco
Reply all
Reply to author
Forward
0 new messages