views:

138

answers:

1

I have wymeditor on sub1.domain.com, which is accesssed by a page on sub2.domains.com.

This live gives an error

var styles = this._doc.styleSheets[0];

Permission denied for <http://removed.example.com&gt; to get property HTMLDocument.styleSheets from <http://removed2.example.com&gt;.

I am assumoing this is a cross site scripting restriiction, but I would like to srve my media froma diffrent domain. How can I do this.

+2  A: 

Add the line document.domain = "domain.com"; in both pages, replacing domain.com with whatever your actual domain name is.

Tim Down
In the html as well as javascript as well? The javascript is third party, so I would like to not modify it if I can.
uswaretech
It needs to be in the JavaScript for each page, at a point before any code that starts trying to talk to the other window.
Tim Down