用fckeidtor做文章的编辑器。结果在使用flvplayer插件增加视频添加功能时出了问题……当然选取图片时也有问题
在Resource Browser这个页面选取时,提示:
行:93
char:2
window.top.opener 为空或不是对象
URL:http://localhost/zhaosheng/zs_admin/fckeditor/editor/filemanager/browser/default/frmresourceslist.html按照http://liuzhiying3002.blog.163.com/blog/static/26003661200821792655285/
提供的经验。我是把OpenFile改了……function OpenFile( fileUrl )
{
fileUrl=unescape(fileUrl);
window.top.opener.SetUrl( encodeURI( fileUrl ) ) ;
window.top.close() ;
window.top.opener.focus() ;
}问题依然未解决……现在就没有再找到资料了。其他改动的配置
文件:fckeditor\editor\filemanager\connectors\php\config.php地址设置:$cut=strrpos($_SERVER['REQUEST_URI'],'fckeditor');
$path=substr($_SERVER['REQUEST_URI'],0,$cut);$Config['UserFilesPath'] = $path.'upload/' ;
$Config['UserFilesAbsolutePath'] = $_SERVER['DOCUMENT_ROOT'].$Config['UserFilesPath']; 
提交类型:
$Config['AllowedExtensions']['Image'] = array('bmp','gif','jpeg','jpg','png') ;
$Config['DeniedExtensions']['Image'] = array() ;
$Config['FileTypesPath']['Image'] = $Config['UserFilesPath'] . 'image/' ;
$Config['FileTypesAbsolutePath']['Image']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'image/' ;
$Config['QuickUploadPath']['Image'] = $Config['UserFilesPath'] . 'image/';
$Config['QuickUploadAbsolutePath']['Image']= $Config['UserFilesAbsolutePath'] . 'image/';$Config['AllowedExtensions']['Flash'] = array('swf','flv','fla','mpg','asf','wma','wmv','avi','rmvb','mid','mp4');
$Config['DeniedExtensions']['Flash'] = array() ;
$Config['FileTypesPath']['Flash'] = $Config['UserFilesPath'] . 'flash/' ;
$Config['FileTypesAbsolutePath']['Flash']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'flash/' ;
$Config['QuickUploadPath']['Flash'] = $Config['UserFilesPath'] . 'flash/';
$Config['QuickUploadAbsolutePath']['Flash']= $Config['UserFilesAbsolutePath'] . 'flash/';____________________________
文件:fckeditor\fckconfig.js
FCKConfig.ImageUpload = true ;
FCKConfig.ImageUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadExtension + '?Type=Image' ;
FCKConfig.ImageUploadAllowedExtensions = ".(jpg|gif|jpeg|png|bmp)$" ; // empty for all
FCKConfig.ImageUploadDeniedExtensions = "" ; // empty for no oneFCKConfig.FlashUpload = true ;
FCKConfig.FlashUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadExtension + '?Type=Flash' ;
FCKConfig.FlashUploadAllowedExtensions   = ".(swf|flv|fla|mpg|asf|wma|wmv|avi|mov|mp4|rmvb|mid)$" ; // empty for all  
FCKConfig.FlashUploadDeniedExtensions = "" ;
希望有熟悉这个问题的人指点迷津……在下不胜感激!
如果有什么没写清除的还望指出。

解决方案 »

  1.   

    没有这种写法的。。要么是window.top、要么就是window.opener,在通常应用情况下,top和opener引用的是同一个窗口对象,即当前窗口的父窗口。
      

  2.   

    举个例子:
    文档A中嵌入了一个iframe  B,在b中又调用window.open打开了一个新窗口C,这种情况下,对于窗口B来说,window.top、window.opener引用的都是其父窗口A。
    对于窗口C来说,window.opener引用的是其父窗口B,window.top引用的则是它的爷爷窗口A。
      

  3.   


    你这样只是消除了系统提示错误……但是没解决“无法链接已经送上服务器的文件”这个问题
     window.top.opener
    这个是系统定义好的……原文件就是如此
    按照http://liuzhiying3002.blog.163.com/blog/static/26003661200821792655285/
    提供的经验。
    只是增加了一句:fileUrl=unescape(fileUrl);