From: guy.pyrzak%gmail.com <> Date: Fri, 23 Jan 2009 21:08:13 +0000 (+0000) Subject: Bug 471518: "Field only appears when:" produces a JavaScript error in Internet Explorer X-Git-Tag: bugzilla-3.3.2~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a77cbd2028075fd0cb2acd7d60a113f7e5248e14;p=thirdparty%2Fbugzilla.git Bug 471518: "Field only appears when:" produces a JavaScript error in Internet Explorer Patch By Jill Foley r=mkanat, a=mkanat --- diff --git a/js/util.js b/js/util.js index 86924210ca..8e787847a4 100644 --- a/js/util.js +++ b/js/util.js @@ -166,7 +166,7 @@ function bz_isValueInArray(aArray, aValue) */ function bz_createOptionInSelect(aSelect, aTextValue, aValue) { var myOption = new Option(aTextValue, aValue); - aSelect.appendChild(myOption); + aSelect.options[aSelect.length] = myOption; return myOption; } diff --git a/template/en/default/admin/custom_fields/cf-js.js.tmpl b/template/en/default/admin/custom_fields/cf-js.js.tmpl index 6c5bbf6262..891f5da764 100644 --- a/template/en/default/admin/custom_fields/cf-js.js.tmpl +++ b/template/en/default/admin/custom_fields/cf-js.js.tmpl @@ -27,7 +27,7 @@ var select_values = new Array(); [% FOREACH sel_field = Bugzilla.get_fields({ is_select => 1 }) %] select_values[[% sel_field.id FILTER js %]] = [ [% FOREACH legal_value = sel_field.legal_values %] - [[% legal_value.id FILTER js %], '[% legal_value.name FILTER html %]'], + [[% legal_value.id FILTER js %], '[% legal_value.name FILTER html %]'][% ',' UNLESS loop.last %] [% END %] ]; [% END %]