[LON-CAPA-cvs] cvs: loncom /interface lonhtmlcommon.pm

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 03 Feb 2004 21:31:52 -0000


albertel		Tue Feb  3 16:31:52 2004 EDT

  Modified files:              
    /loncom/interface	lonhtmlcommon.pm 
  Log:
  - a desprate cry of hope to cure BUG#2665
  
  
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.43 loncom/interface/lonhtmlcommon.pm:1.44
--- loncom/interface/lonhtmlcommon.pm:1.43	Wed Jan 28 19:51:06 2004
+++ loncom/interface/lonhtmlcommon.pm	Tue Feb  3 16:31:52 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common html routines
 #
-# $Id: lonhtmlcommon.pm,v 1.43 2004/01/29 00:51:06 www Exp $
+# $Id: lonhtmlcommon.pm,v 1.44 2004/02/03 21:31:52 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -827,7 +827,9 @@
 sub Create_PrgWin {
     my ($r, $title, $heading, $number_to_do)=@_;
     $r->print('<script>'.
-    "popwin=open(\'\',\'popwin\',\'width=400,height=100\');".
+    "var popwin;
+     function openpopwin () {
+     popwin=open(\'\',\'popwin\',\'width=400,height=100\');".
     "popwin.document.writeln(\'<html><head><title>$title</title></head>".
 	      "<body bgcolor=\"#88DDFF\">".
               "<h4>$heading</h4>".
@@ -835,8 +837,8 @@
               '<input type="text" size="55" name="remaining" value="'.
 	      &mt('Starting').'"></form>'.
               "</body></html>\');".
-    "popwin.document.close();".
-    "</script>");
+    "popwin.document.close();}".
+    "\nwindow.setTimeout(openpopwin,0)</script>");
 
     my %prog_state;
     $prog_state{'done'}=0;