--- loncom/interface/loncommon.pm 2007/12/23 04:11:21 1.628 +++ loncom/interface/loncommon.pm 2007/12/23 16:55:25 1.629 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.628 2007/12/23 04:11:21 raeburn Exp $ +# $Id: loncommon.pm,v 1.629 2007/12/23 16:55:25 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -472,7 +472,10 @@ sub setsec_javascript { my ($sec_element,$formname) = @_; my $setsections = qq| function setSect(sectionlist) { - var sectionsArray = sectionlist.split(","); + var sectionsArray = new Array(); + if ((sectionlist != '') && (typeof sectionlist != "undefined")) { + sectionsArray = sectionlist.split(","); + } var numSections = sectionsArray.length; document.$formname.$sec_element.length = 0; if (numSections == 0) {