Show
Ignore:
Timestamp:
2008-03-25 08:57:35 (5 months ago)
Author:
wwalc
Message:

Fix for #1919 (file browser & relaxation mode issue)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/editor/filemanager/connectors/cfm/cf_io.cfm

    r1652 r1791  
    267267 
    268268        <cfoutput> 
    269                 <script type="text/javascript"> 
     269<script type="text/javascript"> 
     270(function() 
     271{ 
     272        var d = document.domain ; 
     273 
     274        while ( true ) 
     275        { 
     276                // Test if we can access a parent property. 
     277                try 
     278                { 
     279                        var test = window.top.opener.document.domain ; 
     280                        break ; 
     281                } 
     282                catch( e ) {} 
     283 
     284                // Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ... 
     285                d = d.replace( /.*?(?:\.|$)/, '' ) ; 
     286 
     287                if ( d.length == 0 ) 
     288                        break ;         // It was not able to detect the domain. 
     289 
     290                try 
     291                { 
     292                        document.domain = d ; 
     293                } 
     294                catch (e) 
     295                { 
     296                        break ; 
     297                } 
     298        } 
     299})() ; 
     300 
    270301                        window.parent.OnUploadCompleted( #errorNumber#, "#JSStringFormat(fileUrl)#", "#JSStringFormat(fileName)#", "#JSStringFormat(customMsg)#" ); 
    271302                </script>