From cf74a17e34f66ecdeb092f7b020bed95821a2492 Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Wed, 26 Mar 2014 20:10:07 +0100 Subject: Bug 978070: Do not use document.write() to insert HTML code r/a=justdave --- .../en/default/bug/create/create-guided.html.tmpl | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'template/en/default/bug/create/create-guided.html.tmpl') diff --git a/template/en/default/bug/create/create-guided.html.tmpl b/template/en/default/bug/create/create-guided.html.tmpl index 5cc9df64f..4c087c637 100644 --- a/template/en/default/bug/create/create-guided.html.tmpl +++ b/template/en/default/bug/create/create-guided.html.tmpl @@ -29,13 +29,12 @@ var descriptions = [ ]; function PutDescription() { - if ((document.getElementById) && (document.body.innerHTML)) { - var componentIndex = document.getElementById('component').selectedIndex; - if (componentIndex != -1) { - var description = document.getElementById('description'); - description.innerHTML = descriptions[componentIndex]; - } - } + var description = document.getElementById('description'); + var componentIndex = document.getElementById('component').selectedIndex; + YAHOO.util.Dom.removeClass("description", "bz_default_hidden"); + if (componentIndex != -1) { + description.innerHTML = descriptions[componentIndex]; + } } @@ -130,12 +129,8 @@ function PutDescription() { [% END %] -
- +
+ Select a component to see its description here.

-- cgit v1.2.3-24-g4f1b