diff --git a/IPython/frontend/html/notebook/static/js/codecell.js b/IPython/frontend/html/notebook/static/js/codecell.js
index 8accb92..ab157a2 100644
--- a/IPython/frontend/html/notebook/static/js/codecell.js
+++ b/IPython/frontend/html/notebook/static/js/codecell.js
@@ -170,7 +170,7 @@ var IPython = (function (IPython) {
     CodeCell.prototype._handle_execute_reply = function (content) {
         this.set_input_prompt(content.execution_count);
         this.element.removeClass("running");
-        // this.dirty = true;
+        $([IPython.events]).trigger('set_dirty.Notebook', {'value': true});
     }
 
     CodeCell.prototype._handle_set_next_input = function (text) {
diff --git a/IPython/frontend/html/notebook/static/js/notebook.js b/IPython/frontend/html/notebook/static/js/notebook.js
index 2a27ebc..c9b4554 100644
--- a/IPython/frontend/html/notebook/static/js/notebook.js
+++ b/IPython/frontend/html/notebook/static/js/notebook.js
@@ -68,6 +68,10 @@ var IPython = (function (IPython) {
             that.dirty = true;
         });
 
+        $([IPython.events]).on('set_dirty.Notebook', function (event, data) {
+            that.dirty = data.value;
+        });
+
         $([IPython.events]).on('select.Cell', function (event, data) {
             var index = that.find_cell_index(data.cell);
             that.select(index);