--- loncom/interface/lonsearchcat.pm 2006/03/19 22:08:38 1.258 +++ loncom/interface/lonsearchcat.pm 2006/04/07 21:56:01 1.261 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Search Catalog # -# $Id: lonsearchcat.pm,v 1.258 2006/03/19 22:08:38 albertel Exp $ +# $Id: lonsearchcat.pm,v 1.261 2006/04/07 21:56:01 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -199,7 +199,9 @@ sub handler { 'We were unable to retrieve data describing your search. '. 'This is a serious error and has been logged. '. 'Please alert your LON-CAPA administrator.'; - return &error_page($r,$msg); + &Apache::loncommon::simple_error_page($r,'Search Error', + $msg); + return OK; } } } else { @@ -220,7 +222,9 @@ sub handler { # This is a stupid error to give to the user. # It really tells them nothing. my $msg = 'Unable to tie hash to db file.'; - return &error_page($r,$msg); + &Apache::loncommon::simple_error_page($r,'Search Error', + $msg); + return OK; } } ## @@ -361,14 +365,18 @@ END my $msg = 'Unable to create table in which to store search results. '. 'The search has been aborted.'; - return &error_page($r,$msg); + &Apache::loncommon::simple_error_page($r,'Search Error', + $msg); + return OK; } delete($env{'form.launch'}); if (! &make_form_data_persistent($r,$persistent_db_file)) { my $msg= 'Unable to properly store search information. '. 'The search has been aborted.'; - return &error_page($r,$msg); + &Apache::loncommon::simple_error_page($r,'Search Error', + $msg); + return OK; } ## ## Print out the frames interface @@ -380,14 +388,6 @@ END return OK; } -sub error_page { - my ($r,$msg) = @_; - $r->print(&Apache::loncommon::start_page('Search Error'). - &mt($msg). - &Apache::loncommon::end_page()); - return OK; -} - # # The mechanism used to store values away and retrieve them does not # handle the case of missing environment variables being significant. @@ -3125,17 +3125,17 @@ sub print_frames_interface { "&persistent_db_id=".$env{'form.persistent_db_id'}; my $run_search_link = $basic_link."&phase=run_search"; my $results_link = &results_link(); + my $js = < +var targetwin = opener; +var queue = ''; + +JS my $html = &Apache::lonxml::xmlbegin(); - my $head = &Apache::loncommon::headtag('LON-CAPA Digital Library Search Results'); - my $end_head = &Apache::loncommon::endheadtag(); + my $head = &Apache::loncommon::head('LON-CAPA Digital Library Search Results',$js); my $result = <<"ENDFRAMES"; $html $head - -$end_head