--- loncom/interface/lonhtmlcommon.pm 2007/10/01 18:45:40 1.165 +++ loncom/interface/lonhtmlcommon.pm 2007/11/16 06:31:26 1.170 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common html routines # -# $Id: lonhtmlcommon.pm,v 1.165 2007/10/01 18:45:40 banghart Exp $ +# $Id: lonhtmlcommon.pm,v 1.170 2007/11/16 06:31:26 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -481,6 +481,19 @@ ENDJS return $result; } + +sub build_url { + my ($base, $fields)=@_; + my $url; + $url = $base.'?'; + foreach my $key (keys(%$fields)) { + $url.=&escape($key).'='.&escape($$fields{$key}).'&'; + } + $url =~ s/&$//; + return $url; +} + + ############################################## ############################################## @@ -855,7 +868,7 @@ sub Create_PrgWin { function openpopwin () { popwin=open(\'\',\'popwin\',\'width=400,height=100\');". "popwin.document.writeln(\'".$start_page. - "