diff options
Diffstat (limited to 'modules/comment/js/comment.js')
-rw-r--r-- | modules/comment/js/comment.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/comment/js/comment.js b/modules/comment/js/comment.js index d251ac96..7af70047 100644 --- a/modules/comment/js/comment.js +++ b/modules/comment/js/comment.js @@ -6,6 +6,8 @@ function ajaxify_comment_form() { $("#gComments form").ajaxForm({ dataType: 'json', success: function(data) { + $("#gComments form").replaceWith(data.form); + ajaxify_comment_form(); if (data.result == "success") { $.get(data.resource, function(data, textStatus) { $("#gComments .gBlockContent ul:first").append("<li>"+data+"</li>"); @@ -13,8 +15,6 @@ function ajaxify_comment_form() { }); $("#gComments form").clearForm(); } - $("#gComments form").replaceWith(data.form); - ajaxify_comment_form(); } }); }; |