From d25a3617f637c01b98599c9349e7b8cf19f9e3f0 Mon Sep 17 00:00:00 2001 From: Tim Steiner <tsteiner2@unl.edu> Date: Fri, 27 Feb 2009 21:39:54 +0000 Subject: [PATCH] Updates to the new course search/history features. --- document_root/javascript/courses/public-view/search.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/document_root/javascript/courses/public-view/search.js b/document_root/javascript/courses/public-view/search.js index 587d47cc..355894c0 100644 --- a/document_root/javascript/courses/public-view/search.js +++ b/document_root/javascript/courses/public-view/search.js @@ -9,8 +9,10 @@ function onLoadPublicViewSearch() document.getElementById('department').onchange = handleChangeSelectHierarchy; handleChangeSelectHierarchy(); - document.getElementById('printButton').onclick = function() { - window.print(); + if (document.getElementById('printButton')) { + document.getElementById('printButton').onclick = function() { + window.print(); + }; } } @@ -59,7 +61,7 @@ function handleChangeSelectHierarchy() optGroups = subjectSelect.getElementsByTagName('optgroup'); for (var i = optGroups.length - 1; i >= 0; i--) { - if (selectedDepartments.inArray(optGroups[i].label) || collegeSelect.value == 0) { + if (selectedDepartments.inArray(optGroups[i].label)) { optGroups[i].style.display = '' } else { optGroups[i].style.display = 'none'; -- GitLab