diff options
author | Bharat Mediratta <bharat@menalto.com> | 2008-11-16 07:27:36 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2008-11-16 07:27:36 +0000 |
commit | ce7fbf979d249e5e1effb7040d3e51a2c35015e3 (patch) | |
tree | 22028e0f866ac4b803a376549c8db796f80d0431 /themes/default/js/comment.js | |
parent | e3be3cecf5ba6dea5d051c05d86b995f9b1df830 (diff) |
Stop using the target param; replace the form by hand so that we can run ajaxify_comment_form() as needed. Otherwise the 2nd post attempt won't be ajax
Diffstat (limited to 'themes/default/js/comment.js')
-rw-r--r-- | themes/default/js/comment.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/themes/default/js/comment.js b/themes/default/js/comment.js index 5d2ed599..5cb236e8 100644 --- a/themes/default/js/comment.js +++ b/themes/default/js/comment.js @@ -4,9 +4,8 @@ $("document").ready(function() { function ajaxify_comment_form() { $("#gCommentForm").ajaxForm({ - target: "#gCommentForm", complete: function(xhr, statusText) { - ajaxify_comment_form(); + $("#gCommentForm").replaceWith(xhr.responseText); if (xhr.status == 201) { $.get(xhr.getResponseHeader("Location"), function(data, textStatus) { $("#gComment div.gBlockContent ul:first").append(data); @@ -15,6 +14,7 @@ function ajaxify_comment_form() { ); $("#gCommentForm").clearForm(); } + ajaxify_comment_form(); } }); } |