--- loncom/interface/lonhtmlcommon.pm 2021/06/07 06:15:55 1.399
+++ loncom/interface/lonhtmlcommon.pm 2021/10/26 02:31:22 1.400
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.399 2021/06/07 06:15:55 raeburn Exp $
+# $Id: lonhtmlcommon.pm,v 1.400 2021/10/26 02:31:22 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -3433,12 +3433,18 @@ PARAMSONE
if (itemid != null) {
itemh = itemid.offsetHeight;
}
- var primaryheight = document.getElementById('LC_nav_bar').offsetHeight;
- var secondaryheight;
+ var primaryheight = 0;
+ if (document.getElementById('LC_nav_bar') != null) {
+ primaryheight = document.getElementById('LC_nav_bar').offsetHeight;
+ }
+ var secondaryheight = 0;
if (document.getElementById('LC_secondary_menu') != null) {
secondaryheight = document.getElementById('LC_secondary_menu').offsetHeight;
}
- var crumbsheight = document.getElementById('LC_breadcrumbs').offsetHeight;
+ var crumbsheight = 0;
+ if (document.getElementById('LC_breadcrumbs') != null) {
+ crumbsheight = document.getElementById('LC_breadcrumbs').offsetHeight;
+ }
var dccidheight = 0;
if (document.getElementById('dccid') != null) {
dccidheight = document.getElementById('dccid').offsetHeight;