【问题标题】:Jquery is not working with Perl in Openwebmail Code ModificationJquery 在 Openwebmail 代码修改中不能与 Perl 一起使用
【发布时间】:2012-04-15 18:54:04
【问题描述】:

我正在尝试为我们的组织定制 Openwebmail 软件。 我在撰写消息“TO”字段中添加了自动完成功能。数据是从 MySQL 数据库中获取的。它正在处理鼠标事件。 问题是: 1) 导航键在 Auto Completion DIV 中不起作用。

我在 perl html 生成文件 openwebmail-send.pl 中包含了 jquery 文件,就像这样

$html= qq|<script language="JavaScript" src="$config{'ow_htmlurl'}/javascript/htmlarea.openwebmail/htmlarea.js"></script>\n|.
        **q*q|<script type="text/javascript" language="JavaScript" src="$config{'ow_htmlurl'}/javascript/htmlarea.openwebmail/jquery.js"></script>\n|.***
             qq|<script language="JavaScript" src="$config{'ow_htmlurl'}/javascript/htmlarea.openwebmail/dialog.js"></script>\n|.
             qq|<script language="JavaScript" src="$config{'ow_htmlurl'}/javascript/htmlarea.openwebmail/popups/$htmlarealocale/htmlarea-lang.js"></script>\n|.

并将 jquery.js 文件复制到指定位置。

2) 但是在单击页面的任何其他部分时关闭的以下 Jquery 函数不起作用。 错误是:$ 未定义

The Jquery function is as follows
/*
Function for Close Autocompletion DIV
*/
$("body").click(function(){
     document.getElementById("displaycc").innerHTML="";
});

请帮忙解决这两个问题:

  1. 让 Jquery 与 Perl A 函数一起启用向上、向下、
  2. 自动完成 DIV 中的 Enter 和 Tab 键

【问题讨论】:

  • For 2) 用 jQuery 替换 $ 像 jQuery("body").click(function(){//your code here});
  • 这些 * 符号在 Perl 脚本中的作用是什么?这甚至不适合我。你能澄清一下吗?
  • 将 $ 替换为 jQuery("body").click(function(){document.getElementById("displaycc").innerHTML=""; })'。现在错误是“未定义 jQuery”
  • jquery 函数在 composemessage.templte 中定义,这是一个 HTML 页面。所以 /* 用于注释。 jquery文件包含在perl页面openwebmail.send.pl中,生成html页面.....谢谢
  • perl 中的 ** 不存在。对不起,它是错误的。 perl 脚本是这样的 $html= qq|\n|。 qq|\n|.

标签: jquery perl autocomplete


【解决方案1】:

openwebmail beta 已经在 To: Cc: 和 Bcc: 字段中自动完成。为什么要重新发明轮子?

http://openwebmail.acatysmoof.com

查看当前的开发演示。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-07-13
    • 1970-01-01
    • 2015-09-04
    • 2021-05-09
    • 2020-01-28
    • 2018-01-23
    相关资源
    最近更新 更多