From mboxrd@z Thu Jan 1 00:00:00 1970 From: rmccabe@sourceware.org Date: 23 Jul 2007 15:09:17 -0000 Subject: [Cluster-devel] conga/luci/cluster validate_fence.js Message-ID: <20070723150917.28575.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit CVSROOT: /cvs/cluster Module name: conga Branch: RHEL5 Changes by: rmccabe at sourceware.org 2007-07-23 15:09:17 Modified files: luci/cluster : validate_fence.js Log message: Fix code that could cause javascript errors when adding fence devices for the first time with gecko-based browsers (firefox/mozilla/etc). Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/validate_fence.js.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.2.3&r2=1.1.2.4 --- conga/luci/cluster/validate_fence.js 2007/07/12 04:41:39 1.1.2.3 +++ conga/luci/cluster/validate_fence.js 2007/07/23 15:09:17 1.1.2.4 @@ -258,7 +258,15 @@ for (var j = 0 ; j < select_elem.length ; j++) { temp += ''; } - form_xml += '
' + temp + '
'; + var form_name = ''; + + try { + form_name = form[i].attributes['name'].value; + } catch (e) { + form_name = form[i].getAttribute('name'); + } + + form_xml += '
' + temp + '
'; } master_form.fence_xml.value = '' + form_xml + '';