[LON-CAPA-cvs] cvs: loncom /interface lonhtmlcommon.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Tue, 21 Mar 2006 18:39:03 -0000
albertel Tue Mar 21 13:39:03 2006 EDT
Modified files:
/loncom/interface lonhtmlcommon.pm
Log:
- statrt page the popup progress window
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.121 loncom/interface/lonhtmlcommon.pm:1.122
--- loncom/interface/lonhtmlcommon.pm:1.121 Wed Feb 22 14:22:49 2006
+++ loncom/interface/lonhtmlcommon.pm Tue Mar 21 13:39:02 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.121 2006/02/22 19:22:49 raeburn Exp $
+# $Id: lonhtmlcommon.pm,v 1.122 2006/03/21 18:39:02 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -803,20 +803,25 @@
$prog_state{'type'}=$type;
if ($type eq 'popup') {
$prog_state{'window'}='popwin';
- my $html=&Apache::lonxml::xmlbegin();
+ my $start_page =
+ &Apache::loncommon::start_page($title,undef,
+ {'only_body' => 1,
+ 'bgcolor' => '#88DDFF',
+ 'js_ready' => 1});
+ my $end_page = &Apache::loncommon::end_page({'js_ready' => 1});
+
#the whole function called through timeout is due to issues
#in mozilla Read BUG #2665 if you want to know the whole story
- &r_print($r,'<script>'.
+ &r_print($r,'<script type="text/javascript">'.
"var popwin;
function openpopwin () {
popwin=open(\'\',\'popwin\',\'width=400,height=100\');".
- "popwin.document.writeln(\'".$html."<head><title>$title</title></head>".
- "<body bgcolor=\"#88DDFF\">".
+ "popwin.document.writeln(\'".$start_page.
"<h4>$heading</h4>".
"<form name=popremain>".
'<input type="text" size="'.$width.'" name="remaining" value="'.
- &mt('Starting').'"></form>'.
- "</body></html>\');".
+ &mt('Starting').'"></form>'.$end_page.
+ "\');".
"popwin.document.close();}".
"\nwindow.setTimeout(openpopwin,0)</script>");
$prog_state{'formname'}='popremain';