? activemenu/loading.gif
Index: jstools.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/jstools/jstools.module,v
retrieving revision 1.7.2.6
diff -u -r1.7.2.6 jstools.module
--- jstools.module	27 Jun 2007 22:08:08 -0000	1.7.2.6
+++ jstools.module	21 Jul 2007 09:30:24 -0000
@@ -95,3 +95,21 @@
     }
   }
 }
+
+/**
+ * Return data in JSON format (Backport of drupal_json() from Drupal 6).
+ *
+ * This function should be used for JavaScript callback functions returning
+ * data in JSON format. It sets the header for JavaScript output.
+ *
+ * @param $var
+ *   (optional) If set, the variable will be converted to JSON and output.
+ */
+function jstools_json($var = NULL) {
+  // We are returning JavaScript, so tell the browser.
+  drupal_set_header('Content-Type: text/javascript; charset=utf-8');
+
+  if (isset($var)) {
+    echo drupal_to_js($var);
+  }
+} 
Index: activeedit/activeedit.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/jstools/activeedit/activeedit.module,v
retrieving revision 1.4.2.2
diff -u -r1.4.2.2 activeedit.module
--- activeedit/activeedit.module	27 Jun 2007 22:08:07 -0000	1.4.2.2
+++ activeedit/activeedit.module	21 Jul 2007 09:23:56 -0000
@@ -109,7 +109,7 @@
     activeedit_convert_submits($form, $targets[$key]['#submit_text']);
     $data = array('error' => $error, 'message' => theme('status_messages'), 'content' => drupal_render($form));
   }
-  print drupal_to_js(array('status' => TRUE, 'data' => $data));
+  jstools_json(array('status' => TRUE, 'data' => $data));
   exit();
 }
 
Index: activemenu/activemenu.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/jstools/activemenu/activemenu.module,v
retrieving revision 1.8.2.10
diff -u -r1.8.2.10 activemenu.module
--- activemenu/activemenu.module	27 Jun 2007 22:08:07 -0000	1.8.2.10
+++ activemenu/activemenu.module	21 Jul 2007 09:21:32 -0000
@@ -54,7 +54,7 @@
   if ($path = activemenu_get_request_path()) {
     $menu = menu_get_menu();
     $pid = $menu['path index'][$path];
-    print drupal_to_js(array('status' => TRUE, 'content' => theme('menu_tree', $pid)));
+    jstools_json(array('status' => TRUE, 'content' => theme('menu_tree', $pid)));
   }
   exit();
 }
Index: activemenu/modules/book.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/jstools/activemenu/modules/book.inc,v
retrieving revision 1.1.2.4
diff -u -r1.1.2.4 book.inc
--- activemenu/modules/book.inc	27 Jun 2007 22:08:07 -0000	1.1.2.4
+++ activemenu/modules/book.inc	21 Jul 2007 09:23:47 -0000
@@ -40,7 +40,7 @@
     // The book menu will use the nid as the key, so we take the second part of the path which will be the nid.
     $arg = explode('/', $path);
     $nid = $arg[1];
-    print drupal_to_js(array('status' => TRUE, 'content' => book_tree($nid, 5, array($nid))));
+    jstools_json(array('status' => TRUE, 'content' => book_tree($nid, 5, array($nid))));
   }
   exit();
 }
\ No newline at end of file
Index: activesearch/activesearch.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/jstools/activesearch/activesearch.module,v
retrieving revision 1.1.2.6
diff -u -r1.1.2.6 activesearch.module
--- activesearch/activesearch.module	27 Jun 2007 22:08:07 -0000	1.1.2.6
+++ activesearch/activesearch.module	21 Jul 2007 09:24:05 -0000
@@ -93,7 +93,7 @@
   $keys = $form_values['processed_keys'];
   $_GET['q'] = 'search/'. $type .'/'. $keys;
   $_GET['page'] = $form_values['page'];
-  print drupal_to_js(array('status' => TRUE, 'data' => array('keys' => $keys, 'results' => activesearch_results($keys, $type))));
+  jstools_json(array('status' => TRUE, 'data' => array('keys' => $keys, 'results' => activesearch_results($keys, $type))));
   exit();
 }
 
Index: ajaxsubmit/ajaxsubmit.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/jstools/ajaxsubmit/ajaxsubmit.module,v
retrieving revision 1.10.2.2
diff -u -r1.10.2.2 ajaxsubmit.module
--- ajaxsubmit/ajaxsubmit.module	27 Jun 2007 22:08:07 -0000	1.10.2.2
+++ ajaxsubmit/ajaxsubmit.module	21 Jul 2007 09:26:14 -0000
@@ -157,7 +157,7 @@
       'destination' => $_SESSION['ajaxsubmit_destination'] ? $_SESSION['ajaxsubmit_destination'] : NULL
     )
   );
-  print drupal_to_js($result);
+  jstools_json($result);
   exit();
 }
 
Index: dynamicload/dynamicload.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/jstools/dynamicload/dynamicload.module,v
retrieving revision 1.17.2.6
diff -u -r1.17.2.6 dynamicload.module
--- dynamicload/dynamicload.module	27 Jun 2007 22:08:07 -0000	1.17.2.6
+++ dynamicload/dynamicload.module	21 Jul 2007 09:24:47 -0000
@@ -359,7 +359,7 @@
   }
   $region = db_result(db_query("SELECT region FROM {blocks} WHERE module = '%s' AND delta = %d AND theme = '%s'", $module, $delta, $theme_key));
   $blocks = block_list($region);
-  print drupal_to_js(array(
+  jstools_json(array(
     'result' => TRUE,
     'content' => theme('block', $blocks[$module .'_'. $delta]),
   ));
@@ -431,6 +431,6 @@
       'message' => t('No request found.'),
     );
   }
-  print drupal_to_js($result);
+  jstools_json($result);
   exit();
 }
