r76399 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76398‎ | r76399 | r76400 >
Date:17:48, 9 November 2010
Author:yaron
Status:deferred
Tags:
Comment:
Added check for nonexistent div IDs in "show on select"
Modified paths:
  • /trunk/extensions/SemanticForms/libs/SemanticForms.js (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/libs/SemanticForms.js
@@ -214,6 +214,7 @@
215215 function showIfSelected(input_id, options_array, div_id) {
216216 the_input = document.getElementById(input_id);
217217 the_div = document.getElementById(div_id);
 218+ if ( the_div == null ) { return; }
218219 for (var i in options_array) {
219220 if (the_input.value == options_array[i]) {
220221 the_div.style.display = ''; // return to default

Status & tagging log