Index: modules/node.module =================================================================== RCS file: /cvs/drupal/drupal/modules/node.module,v retrieving revision 1.527 diff -u -r1.527 node.module --- modules/node.module 2 Sep 2005 02:11:41 -0000 1.527 +++ modules/node.module 12 Sep 2005 21:07:06 -0000 @@ -1299,6 +1299,9 @@ * Generate the node editing form. */ function node_form($edit) { + // Add warning to user if they are about to navigate away after making changes to node form + drupal_add_js('misc/formcheck.js'); + // Validate the node if we don't already know the errors. if (!$edit->validated) { $edit = node_validate($edit); @@ -1405,7 +1408,7 @@ } } - $attributes = array('id' => 'node-form'); + $attributes = array('id' => 'node-form','onsubmit' => 'isSubmit=true;'); if (is_array($param['options'])) { $attributes = array_merge($param['options'], $attributes); }