View Full Version : HTMLEditor and document.domain

11 Jan 2010, 1:56 PM
Hi all
I am using ExtJS 2.x ( but I believe the problem would exist in 3.x from a look in the code ). and the HTMLEditor component. I have issues with IE ( v7 maybe 6 ). My app sets document.domain=document.domain since it is using Orbited and streams data from a subdomain. So I run into permission denied errors with the HtmlEditor's IFrame. Now, I managed to fix a similar problem in the ExtJS history frame by setting document.domain in the frames HTML, but cannot seem to find a way to get rid of permission denied errors for the HTML Editor

currently have modified as follows
getDocMarkup : function(){
return '<html><head><style type="text/css">body{border:0;margin:0;padding:3px;height:98%;cursor:text;}</style><script type="text/javascript"> document.domain = "'+document.domain+'";</script></head><body></body></html>'

and in onRender

iframe.src = 'javascriptfunction(){document.open();document.domain="' + document.domain + '";document.close();})();'

with everything else staying the same, but still no luck.

After spinning my wheels for hours, searching and trying different things, I thought I would ask. Surely someone has run into this issue before! Can anyone help

11 Jan 2010, 2:01 PM
sorry theOnRender looks like this

iframe.src = 'javascript:(function(){document.open();document.domain="' + document.domain + '";document.close();})()';