From 2538037f120d9f24bf06c33de94d99e0fa469b08 Mon Sep 17 00:00:00 2001 From: dongsheng Date: Fri, 11 Sep 2009 02:17:54 +0000 Subject: [PATCH] "MDL-16697, two js functions to destroy and show html element" --- lib/javascript-static.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/javascript-static.js b/lib/javascript-static.js index 7c8521ca69..7faa09c2a5 100644 --- a/lib/javascript-static.js +++ b/lib/javascript-static.js @@ -1094,6 +1094,19 @@ function hide_item(itemid) { } } +function show_item(itemid) { + var item = document.getElementById(itemid); + if (item) { + item.style.display = ""; + } +} + +function destroy_item(itemid) { + var item = document.getElementById(itemid); + if (item) { + item.parentNode.removeChild(item); + } +} /** * Tranfer keyboard focus to the HTML element with the given id, if it exists. * @param controlid the control id. -- 2.39.5