Difference between revisions of "MediaWiki:Common.js"

From OPENRESEARCH th copy Wiki
Jump to navigation Jump to search
(Undo revision 20993 by Tim Holzheim (talk))
Tag: Undo
(Undo revision 20992 by Tim Holzheim (talk))
Tag: Undo
Line 7: Line 7:
 
     x.style.display = "none";
 
     x.style.display = "none";
 
   }
 
   }
}
 
 
 
function generateFormFields(property_list){
 
  var res = "";
 
  var arrayLength = property_list.length;
 
  for (var i = 0; i < arrayLength; i++) {
 
      console.log(property_list[i]);
 
      var property = property_list[i];
 
      var template = "*${property}*";
 
      res = res + template;
 
  }
 
  return res;
 
 
}
 
}

Revision as of 00:08, 19 February 2021

/* Any JavaScript here will be loaded for all users on every page load. */
function toggleHideShow(id) {
  var x = document.getElementById(id);
  if (x.style.display === "none") {
    x.style.display = "block";
  } else {
    x.style.display = "none";
  }
}