Revision 8728
Added by Lauren Walker almost 11 years ago
lib/style/common/templates/entryForm.js | ||
---|---|---|
164 | 164 |
var elem = document.getElementById(afterTag); |
165 | 165 |
|
166 | 166 |
elem = elem.nextSibling.nextSibling; |
167 |
while (elem.nodeName == "TR") { |
|
167 |
|
|
168 |
while (elem && elem.nodeName == "TR") { |
|
168 | 169 |
var nodes = elem.getElementsByTagName("input"); |
169 | 170 |
for(var i = 0; i < nodes.length; i++) { |
170 | 171 |
var node = nodes.item(i); |
lib/style/common/templates/metacatui/entryForm.js | ||
---|---|---|
163 | 163 |
|
164 | 164 |
function sortTagWithAttributeName(tag, afterTag, parentTag) { |
165 | 165 |
var elem = document.getElementById(afterTag); |
166 |
|
|
167 |
elem = elem.nextSibling.nextSibling; |
|
168 |
while (elem.nodeName == "TR") { |
|
166 |
|
|
167 |
elem = elem.nextSibling; |
|
168 |
|
|
169 |
while (elem && elem.nodeName == "TR") { |
|
169 | 170 |
var nodes = elem.getElementsByTagName("input"); |
170 | 171 |
for(var i = 0; i < nodes.length; i++) { |
171 | 172 |
var node = nodes.item(i); |
Also available in: Unified diff
Check for undefined and null elements to avoid errors in IE 8 and earlier in the registry entry form JS