[LON-CAPA-cvs] cvs: loncom /homework grades.pm

www lon-capa-cvs@mail.lon-capa.org
Wed, 29 Sep 2004 15:04:50 -0000


www		Wed Sep 29 11:04:50 2004 EDT

  Modified files:              
    /loncom/homework	grades.pm 
  Log:
  Same as Bug #3449 - document.open does not work on Safari
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.218 loncom/homework/grades.pm:1.219
--- loncom/homework/grades.pm:1.218	Wed Sep 29 01:46:11 2004
+++ loncom/homework/grades.pm	Wed Sep 29 11:04:50 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.218 2004/09/29 05:46:11 albertel Exp $
+# $Id: grades.pm,v 1.219 2004/09/29 15:04:50 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -991,6 +991,7 @@
     my $request = shift;
     my $iconpath = $request->dir_config('lonIconsURL');
     &commonJSfunctions($request);
+    my $docopen=&Apache::lonhtmlcommon::javascript_docopen();
     $request->print(<<SUBJAVASCRIPT);
 <script type="text/javascript" language="javascript">
 
@@ -1103,7 +1104,7 @@
     pWin = window.open('', 'MessageCenter', 'resizable=yes,toolbar=no,location=no,scrollbars='+scrollbar+',screenx='+xpos+',screeny='+ypos+',width=600,height='+height);
     pWin.focus();
     pDoc = pWin.document;
-    pDoc.open('text/html','replace');
+    pDoc.$docopen;
     pDoc.write("<html><head>");
     pDoc.write("<title>Message Central</title>");
 
@@ -1234,7 +1235,7 @@
     hwdWin = window.open('', 'KeywordHighlightCentral', 'resizeable=yes,toolbar=no,location=no,scrollbars=no,width=400,height=300,screenx='+xpos+',screeny='+ypos);
     hwdWin.focus();
     var hDoc = hwdWin.document;
-    hDoc.open('text/html','replace');
+    hDoc.$docopen;
     hDoc.write("<html><head>");
     hDoc.write("<title>Highlight Central</title>");