[LON-CAPA-cvs] cvs: loncom /xml londefdef.pm
www
lon-capa-cvs@mail.lon-capa.org
Mon, 12 May 2003 20:13:36 -0000
www Mon May 12 16:13:36 2003 EDT
Modified files:
/loncom/xml londefdef.pm
Log:
Bug 1193: frameset needs to not only include the load and unload Javascript
routines, but also actually call them.
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.132 loncom/xml/londefdef.pm:1.133
--- loncom/xml/londefdef.pm:1.132 Wed May 7 13:24:16 2003
+++ loncom/xml/londefdef.pm Mon May 12 16:13:36 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Tags Default Definition Module
#
-# $Id: londefdef.pm,v 1.132 2003/05/07 17:24:16 sakharuk Exp $
+# $Id: londefdef.pm,v 1.133 2003/05/12 20:13:36 www Exp $
#
#
# Copyright Michigan State University Board of Trustees
@@ -2224,7 +2224,29 @@
$currentstring.='<head>'.
&Apache::lonmenu::registerurl(undef,$target).'</head>';
}
- $currentstring .= $token->[4];
+ my $onLoad='';
+ foreach my $key (keys(%{$token->[2]})) {
+ if ($key =~ /^onload$/i) {
+ $onLoad.=$token->[2]->{$key}.';';
+ delete($token->[2]->{$key});
+ }
+ }
+ $token->[2]->{'onload'}=&Apache::lonmenu::loadevents().';'.$onLoad;
+ my $onUnload='';
+ foreach my $key (keys(%{$token->[2]})) {
+ if ($key =~ /^onunload$/i) {
+ $onUnload.=$token->[2]->{$key}.';';
+ delete($token->[2]->{$key});
+ }
+ }
+ $token->[2]->{'onunload'}=&Apache::lonmenu::unloadevents().
+ ';'.$onUnload;
+
+ $currentstring .= '<'.$token->[1];
+ foreach (keys %{$token->[2]}) {
+ $currentstring.=' '.$_.'="'.$token->[2]->{$_}.'"';
+ }
+ $currentstring.='>';
}
return $currentstring;
}