使用FCKeditor添加文章时,在文章最后多了逗号

作者:mickeyboy 来源:蓝色理想 时间:2007-10-11 13:38:00 

【问】使用FCKeditor添加文章时,在文章最后多了逗号。

【答】此情况发生在asp环境中。在asp里对于 提交的表单信息中如果有相同name属性的键值对  做‘逗号连接处理’ 你们一定是使用了这样的js方法建立了编辑器


var oFCKeditor = new FCKeditor( ’editor’ ) ;
oFCoFCKeditor.Create() ;


然后 又在同一个表单里面 添加了 一个id="editor" 或者 name ="editor"的 文本域
造成的!这样的话载入以后,实际上存在了两个 名称为editor表单控件了 所以在提交更新的时候,浏览器会出现逗号。

解决的方法是:第一种:不要在表单里面 添加 多余的 名为 editor 的文本域了

第二种:使用 fckeditor 的ReplaceTextarea()方法 :


window.onload = function()
{
       // Automatically calculates the editor base path based on the _samples directory.
       // This is usefull only for these samples. A real application should use something like this:
       // oFCKeditor.BasePath = '/fckeditor/' ;       // '/fckeditor/' is the default value.
       var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_samples')) ;

       var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
       oFCKeditor.BasePath       = sBasePath ;
       oFCKeditor.ReplaceTextarea() ;
}

具体的可以看 fckeditor的实例中的html实例第二个

标签:FCKeditor,文章
0
投稿

猜你喜欢

  • 如何把Recordset转换成彩色的XML文件?

    2009-11-02 20:22:00
  • IE下的firebug方法

    2009-07-29 18:50:00
  • 别开生面:纯CSS实现相册滑动浏览

    2008-06-26 13:24:00
  • 轻松掌握怎样从Windows命令行启动MySQL

    2009-02-23 17:18:00
  • Firefox 下 innerHTML 的一个 BUG

    2008-08-05 18:19:00
  • SQL Server 2005常见问题浅析

    2009-03-16 14:06:00
  • 完全讲解 使用MSCS建立SQL Server集群

    2009-01-19 14:10:00
  • 互联网产品交互事件分析

    2009-10-06 15:23:00
  • 通过排序引导用户的行为方式

    2008-05-17 09:30:00
  • 对SQL Server聚集索引的指示综合描述

    2010-08-31 14:25:00
  • PHP结构型模式之代理模式

    2023-05-25 06:55:34
  • 浏览器 cookie 限制

    2008-05-23 13:09:00
  • asp检测是否为中文字符函数

    2011-04-07 11:19:00
  • 比较SQL Server与Oracle、DB2三种数据库

    2008-09-12 17:24:00
  • SQL Server性能的改进得益于逻辑数据库设计

    2009-10-23 13:55:00
  • Oracle性能究极优化

    2010-07-30 13:02:00
  • 使用css2.1实现多重背景、多重边框效果[译]

    2010-08-23 16:32:00
  • XML与HTML的结合(上)

    2008-09-05 17:19:00
  • 交互设计实用指南系列(3)—“有效性”之“适时帮助”

    2009-12-25 14:29:00
  • 远程连接sql server 2000服务器的解决方案

    2010-03-08 13:33:00
  • asp之家 网络编程 m.aspxhome.com