--- loncom/interface/lonhtmlcommon.pm 2013/07/22 11:46:23 1.352
+++ loncom/interface/lonhtmlcommon.pm 2013/11/17 14:40:31 1.353
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.352 2013/07/22 11:46:23 raeburn Exp $
+# $Id: lonhtmlcommon.pm,v 1.353 2013/11/17 14:40:31 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2938,7 +2938,7 @@ ENDSCRIPT
##############################################
sub resize_scrollbox_js {
- my ($context,$tabidstr) = @_;
+ my ($context,$tabidstr,$tid) = @_;
my (%names,$paddingwfrac,$offsetwfrac,$offsetv,$minw,$minv);
if ($context eq 'docs') {
%names = (
@@ -2974,9 +2974,11 @@ window.onresize=callResize;
';
if ($context eq 'docs') {
- $output .= '
-var activeTab;
-';
+ if ($env{'form.active'}) {
+ $output .= "\nvar activeTab = '$env{'form.active'}$tid';\n";
+ } else {
+ $output .= "\nvar activeTab = '';\n";
+ }
}
$output .= <<"FIRST";