--- loncom/xml/lonxml.pm	2003/05/03 21:09:03	1.251
+++ loncom/xml/lonxml.pm	2003/05/16 18:34:56	1.252
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # XML Parser Module 
 #
-# $Id: lonxml.pm,v 1.251 2003/05/03 21:09:03 albertel Exp $
+# $Id: lonxml.pm,v 1.252 2003/05/16 18:34:56 bowersj2 Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1252,6 +1252,18 @@ ENDNOTFOUND
 
   writeallows($request->uri);
 
+  # If we're editing, show the filename of the resource in the frame's main
+  # title
+  if ($ENV{'form.editmode'}) {
+      my $filename = $request->uri;
+      # Everything after the last /
+      $filename = substr($filename, rindex($filename, '/') + 1);
+      $result = substr($result, 0, rindex($result, '</html>'));
+      $result .= "<script>top.document.title = '$filename - LON-CAPA Construction Space';</script>";
+      $result .= "\n</html>\n";
+  }
+
+
   $request->print($result);
 
   return OK;