Hi there,
I'm loading the comment section with this function "comment_node_page_additions()" and i'm including the result in the page with esi and varnish (would be the same if loaded with ajax).
I'm attaching behaviour for the "answer" button but i cant get the submit works.
i've added in the page the drupal ajax library and at the load i execute this code for adding the objects:
jQuery.extend(Drupal.settings, {
"ajax": {
"edit-submit": {
"callback": "ajax_comments_submit_js",
"wrapper": "comment-form",
"method": "replaceWith",
"effect": "fade",
"event": "mousedown",
"keypress": true,
"prevent": "click",
"url": "\/system\/ajax",
"submit": {
"_triggering_element_name": "op",
"_triggering_element_value": "Salva"
}
}
}
});
Drupal.attachBehaviors("input#edit-submit");
but i get this error:
An error occurred while attempting to process /system/ajax: ajax.form.ajaxSubmit is not a function
how can i deal with this and get the comments area workign correctly?
Thanks best regards.
[SOLVED]
Solved by adding the jquery.form.js plugin and editing a bit the module yo.
Comments
Comment #1
andrea.cavattoni CreditAttribution: andrea.cavattoni commentedComment #2
M@ster CreditAttribution: M@ster commentedHi. I have same problem.
Where you added call jquery.form.js ?
tnx