changeset 1764:cd50fbc275a1

Fix JavaScript error when help was asked while no keyword was defined. (patch by Kurt Steinkraus)
author Johannes Gijsbers <jlgijsbers@users.sourceforge.net>
date Wed, 27 Aug 2003 17:34:57 +0000
parents 4c7f5d925b12
children 14a2f1529759
files templates/classic/html/help_controls.js
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/templates/classic/html/help_controls.js	Tue Aug 26 12:54:08 2003 +0000
+++ b/templates/classic/html/help_controls.js	Wed Aug 27 17:34:57 2003 +0000
@@ -53,6 +53,7 @@
 
 function updateList() {
   // write back to opener window
+  if (document.frm_help.check==undefined) { return; }
   var list = new Array();
   for (box=0; box < document.frm_help.check.length; box++) {
       if (document.frm_help.check[box].checked) {
@@ -64,6 +65,7 @@
 
 function updatePreview() {
   // add new checkbox selections to preview
+  if (document.frm_help.check==undefined) { return; }
   var list = new Array();
   for (box=0; box < document.frm_help.check.length; box++) {
       if (document.frm_help.check[box].checked) {
@@ -76,6 +78,7 @@
 
 function clearList() {
   // uncheck all checkboxes
+  if (document.frm_help.check==undefined) { return; }
   for (box=0; box < document.frm_help.check.length; box++) {
       document.frm_help.check[box].checked = false;
   }
@@ -83,6 +86,7 @@
 
 function reviseList(vals) {
   // update the checkboxes based on the preview field
+  if (document.frm_help.check==undefined) { return; }
   var to_check;
   var list = vals.split(",");
    for (box=0; box < document.frm_help.check.length; box++) {
@@ -100,6 +104,7 @@
 
 function resetList() {
   // reset preview and check boxes to initial values
+  if (document.frm_help.check==undefined) { return; }
   var to_check;
   var list = original_field.split(',');
   writePreview(list);

Roundup Issue Tracker: http://roundup-tracker.org/