Just reset the tag form after submission; no need to replace it with one from the backend because it's going to be the same form anyway.

This commit is contained in:
Bharat Mediratta
2009-02-09 00:30:13 +00:00
parent b15e0c7529
commit 9f4fdcd8d5

View File

@@ -6,16 +6,12 @@ function ajaxify_tag_form() {
$("#gTag form").ajaxForm({
dataType: "json",
success: function(data) {
if (data.form) {
$("#gTag form").replaceWith(data.form);
ajaxify_tag_form();
}
if (data.result == "success") {
$.get($("#gTagCloud").attr("src"), function(data, textStatus) {
$("#gTagCloud").html(data);
});
}
$("#gTag form").clearForm();
$("#gTag form").resetForm();
}
});
}