commit fb85ef18f3cffbe0088ab7b8cb657e9ee65a4fa9
Author: Ryan Hughes <rjhughes@med.umich.edu>
Date:   Tue Nov 29 10:28:53 2011 -0500

    ajax module works if javascript is blocked.

diff --git a/sites/all/modules/ajax/ajax.js b/sites/all/modules/ajax/ajax.js
index 10e5968..c5002cd 100644
--- a/sites/all/modules/ajax/ajax.js
+++ b/sites/all/modules/ajax/ajax.js
@@ -33,12 +33,22 @@ Drupal.Ajax.init = function(context) {
     }
     s = $('input[type="submit"]', f);
     s.click(function(){
+      if (!$('input[type="hidden"][name="ajax_ajax_submit"]', f).attr('value')) {
+        return true;
+      }
+
       this.form.ajax_activator = $(this);
       return true;
     });
     f.each(function(){
       this.ajax_activator = null;
+      $('input[type="hidden"][name="ajax_ajax_submit"]', $(this)).attr('value', 1);
+
       $(this).submit(function(){
+        if (!$('input[type="hidden"][name="ajax_ajax_submit"]', $(this)).attr('value')) {
+          return true;
+        }
+
         if (this.ajax_activator === null) {
           this.ajax_activator = $('#edit-submit', this);
         }
@@ -53,6 +63,12 @@ Drupal.Ajax.init = function(context) {
       return true;
     });
   }
+
+  // Ajax submission will be disabled by default.  We change this value 
+  // in javascript.  That way, the forms will fall back to non-ajax if the
+  // browser is blocking scripts.
+  $('input[type="hidden"][name="ajax_ajax_submit"]', f).attr('value', 1);
+
   return true;
 };
 
diff --git a/sites/all/modules/ajax/ajax.module b/sites/all/modules/ajax/ajax.module
index cdf891c..7e8dcdb 100644
--- a/sites/all/modules/ajax/ajax.module
+++ b/sites/all/modules/ajax/ajax.module
@@ -43,6 +43,13 @@ function ajax_preprocess_page(&$variables) {
 function ajax_form_alter(&$form, $form_state, $form_id) {
   ajax_form_configure($form, $form_state, $form_id);
   if (ajax_is_enabled($form) && !$form['#programmed']) {
+    // Ajax submission will be disabled by default.  This value will be changed
+    // by javascript.  That way, the forms will fall back to non-ajax if the
+    // browser is blocking scripts.
+    $form['ajax_ajax_submit'] = array(
+      '#type' => 'hidden',
+      '#default_value' => 0,
+    );
     $found = array('submitter' => FALSE);
     ajax_invoke_alter($form, $form_state, $form_id);
     ajax_validator_set($form);
@@ -314,6 +321,13 @@ function ajax_get_url($url) {
  * @return Bool
  */
 function ajax_submitter(&$form, &$form_state) {
+  // Ajax submission will be disabled by default.  The value of this field will
+  // be changed by javascript.  That way, the forms will fall back to non-ajax
+  // if the browser is blocking scripts.
+  if (!$form_state['values']['ajax_ajax_submit']) {
+    return false;
+  }
+
   $messages = drupal_get_messages(NULL, TRUE);
   $data = array(
     'form_id' => $form_state['values']['form_id'],
@@ -411,6 +425,13 @@ function ajax_invoke_alter(&$form, &$form_state, $form_id) {
  */
 function ajax_validator(&$form, &$form_state) {
   if (array_key_exists('drupal_ajax', $_REQUEST)) {
+    // Ajax submission will be disabled by default.  The value of this field will
+    // be changed by javascript.  That way, the forms will fall back to non-ajax
+    // if the browser is blocking scripts.
+    if (!$form_state['values']['ajax_ajax_submit']) {
+      return;
+    }
+
     drupal_get_messages(NULL, TRUE);
     $data = ajax_build(array(
       'messages_error' => form_get_errors(),
