Drupal 6 AHAH / AJAX 表单提交

发布于 2024-09-13 09:42:23 字数 280 浏览 1 评论 0原文

我正在 Drupal 6 中构建一个自定义模块,它显示一个带有表单和一些其他元素(如文本和图像)的块。当使用 AHAH 提交时,PHP 中会发生一些逻辑,然后将结果传递给 JQuery,JQuery 将更新块中的元素。主要是一些图片和一些文字。

我无法理解使用 AHAH,但看起来这就是我应该使用的。目前,我的表单带有实现“#ahah”的提交按钮,并且路径设置为菜单挂钩中定义的路径。菜单挂钩将其传递给执行逻辑的回调函数,然后我就陷入了死胡同。如何将结果发送到 jQuery?

有什么想法吗?

豪伊

I'm building a custom module in Drupal 6 which display a block with a form and some other elements like text and images. When it's submitted, using AHAH, some logic takes place in PHP and then the result is passed to JQuery which will update the elements in the block. Mainly a few images and some text.

I can't wrap my head around using AHAH, but it seems like that's what I'm supposed to be using. Currently I have my form with the submit button implementing '#ahah' and the path is set to a path defined in my menu hook. The menu hook passes it to the callback function which performs the logic then I'm at a dead end. How do I get the results to jQuery?

Any ideas?

Howie

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

薄凉少年不暖心 2024-09-20 09:42:23

使用以下方法找到了解决方案:http://drupal.org/project/examples

Figured out a solution using: http://drupal.org/project/examples.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文