--- loncom/xml/scripttag.pm 2000/10/05 19:31:54 1.18 +++ loncom/xml/scripttag.pm 2000/10/30 20:34:25 1.22 @@ -9,7 +9,8 @@ use Apache::lonnet; sub BEGIN { &Apache::lonxml::register('Apache::scripttag',('script','scriptlib', - 'parserlib','import')); + 'parserlib','import', + 'footnote')); } $Apache::scripttag::SCRIPT_RESULT=''; @@ -24,7 +25,7 @@ sub start_script { $Apache::scripttag::SCRIPT_RESULT=''; if ($type eq "loncapa/perl") { $safeeval->share('$SCRIPT_RESULT'); - my $bodytext=&Apache::lonxml::get_all_text("script",$$parser[$#$parser]); + my $bodytext=&Apache::lonxml::get_all_text("/script",$$parser[$#$parser]); if ( $target eq "modified" ) { } @@ -96,6 +97,23 @@ sub start_parserlib { sub end_parserlib { } +sub start_footnote { + my ($target,$token,$parstack,$parser,$safeeval,$style)=@_; + my $result = ''; + $Apache::lonxml::redirection = 0; + return $result; +} + +sub end_footnote { + my ($target,$token,$parstack,$parser,$safeeval,$style)=@_; + $Apache::lonxml::outputstack =~ s/\"/\"\;/g; + my $result = "newwindow $Apache::lonxml::outputstack \');newWindow.document.close();void(0);\">*"; + if ($target eq 'meta') {$result = '';} + $Apache::lonxml::outputstack = ""; + $Apache::lonxml::redirection = 1; + return $result; +} + sub start_import { my ($target,$token,$parstack,$parser,$safeeval,$style)=@_; my $bodytext=$$parser[$#$parser]->get_text("/import");