diff --git a/boards/static/js/thread_update.js b/boards/static/js/thread_update.js
--- a/boards/static/js/thread_update.js
+++ b/boards/static/js/thread_update.js
@@ -317,17 +317,19 @@ function processNewPost(post) {
var form = $('#form');
- var options = {
- beforeSubmit: function(arr, $form, options) {
- showAsErrors($('form'), gettext('Sending message...'));
- },
- success: updateOnPost,
- url: '/api/add_post/' + threadId + '/'
- };
+ if (form.length > 0) {
+ var options = {
+ beforeSubmit: function(arr, $form, options) {
+ showAsErrors($('form'), gettext('Sending message...'));
+ },
+ success: updateOnPost,
+ url: '/api/add_post/' + threadId + '/'
+ };
- form.ajaxForm(options);
+ form.ajaxForm(options);
- resetForm(form);
+ resetForm(form);
+ }
}
$('#autoupdate').click(getThreadDiff);
diff --git a/boards/templates/boards/thread.html b/boards/templates/boards/thread.html
--- a/boards/templates/boards/thread.html
+++ b/boards/templates/boards/thread.html
@@ -61,12 +61,12 @@
-
-
{% endif %}
+
+
{% endcache %}
{% endblock %}