jQuery   发布时间:2022-03-30  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了Drupal 6/jQuery Ajax更新字段大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我在同一个站点上的路径不同,我需要允许用户更改他/她在不同位置写入的节点上的字段内容.我有nodeid和字段名称,以及ids等np.

我不相信这太难了,但教程或解释会很精彩.

谢谢.

编辑:谢谢anschauung的询问,所以澄清一下:

这是CCK textarea.至于为什么,有一个中心节点类型,有许多链接节点参考节点.从引用中心节点的任何节点的编辑页面,它需要能够编辑和保存中心节点的字段.这就是我的用例.

再次感谢.

非常感谢googletorp,我非常感谢你的帮助.

这是我到目前为止所拥有的:

对于第一步:

function update_main_field_menu() {

  $items = array();

  $items['update_main_field/%'] = array(
    'title' => 'Update Main Field','page callback' => 'post_to_main_node','page arguments' => 1,'type' => MENU_CALLBACK
  );

  return $items;
}

第二步:

function post_to_main_node(){
    // Sorry,I'm totally lost. What do I put here?
}

你也提到了这个:

如何生成节点表单?

第三步:

function modulename_form_mainct???_node_form_alter (&$form,&$form_state) {

    // I'm not sure about which form I'm doing node form alter on. If I do it to the mainct,wouldn't that alter the regular edit page the user is viewing? I only want to load the js for the ajax submission. Is there a update_main_field node form?


    drupal_add_js(drupal_get_path('module','modulename') ."/updateField.js");
}

此外,步骤2中的功能与步骤3中的节点形式之间的区别是什么?

步骤4:
我想我大部分都理解,但由于其他事情,我还无法测试它.

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。

大佬总结

以上是大佬教程为你收集整理的Drupal 6/jQuery Ajax更新字段全部内容,希望文章能够帮你解决Drupal 6/jQuery Ajax更新字段所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签: