summaryrefslogtreecommitdiff
path: root/js/util.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/util.js')
-rw-r--r--js/util.js15
1 files changed, 13 insertions, 2 deletions
diff --git a/js/util.js b/js/util.js
index d5e1c8720..9f66e393c 100644
--- a/js/util.js
+++ b/js/util.js
@@ -68,9 +68,20 @@ $(document).ready(function(){
var id = new_form.id.replace('favor', 'disfavor');
$('form#'+id).replace(new_form);
}};
-
+
+ function addAjaxHidden(form) {
+ ajax = document.newElement('input');
+ ajax.addAttribute('type', 'hidden');
+ ajax.addAttribute('name', 'ajax');
+ ajax.addAttribute('value', 1);
+ form.appendChild(ajax);
+ }
+
$("form.favor").ajaxForm(favoptions);
- $("form.disfavor").ajaxForm(disoptions);
+ $("form.disfavor").ajaxForm(disoptions);
+
+ $("form.favor").each(addAjaxHidden);
+ $("form.disfavor").each(addAjaxHidden);
});
function doreply(nick) {